X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cb16b81e8948c24b5aecdc0d0b68994482a76734..cf454dfcf7c27e86e15af1a45c58dbb7a76e43c8:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 823c219724..a15bc1faab 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -96,6 +96,7 @@ void Cpu::on_speed_change() Cpu* Cpu::set_core_count(int core_count) { + xbt_assert(not is_sealed(), "Core count cannot be changed once CPU has been sealed"); xbt_assert(core_count > 0, "Host %s must have at least one core, not 0.", piface_->get_cname()); core_count_ = core_count; return this; @@ -113,6 +114,11 @@ void Cpu::set_speed_profile(kernel::profile::Profile* profile) speed_.event = profile->schedule(&profile::future_evt_set, this); } +void Cpu::seal() +{ + Resource::seal(); +} + /********** * Action * **********/