X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1b2975e32481a9b38fe38af90db86ac5c54d8e59..12e37132d1b9b141fa8497e17b0629cfd4173c36:/src/surf/HostImpl.cpp diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index 42e84f1f87..8983db795e 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -24,7 +24,7 @@ namespace surf { *********/ /* Helper function for executeParallelTask */ -static inline double has_cost(double* array, size_t pos) +static inline double has_cost(const double* array, size_t pos) { if (array) return array[pos]; @@ -32,8 +32,9 @@ static inline double has_cost(double* array, size_t pos) return -1.0; } -kernel::resource::Action* HostModel::execute_parallel(size_t host_nb, s4u::Host** host_list, double* flops_amount, - double* bytes_amount, double rate) +kernel::resource::Action* HostModel::execute_parallel(size_t host_nb, s4u::Host* const* host_list, + const double* flops_amount, const double* bytes_amount, + double rate) { kernel::resource::Action* action = nullptr; if ((host_nb == 1) && (has_cost(bytes_amount, 0) <= 0) && (has_cost(flops_amount, 0) > 0)) { @@ -121,7 +122,7 @@ void HostImpl::turn_off() for (auto& actor : process_list_) { XBT_DEBUG("Killing Actor %s@%s on behalf of %s which turned off that host.", actor.get_cname(), actor.host_->get_cname(), SIMIX_process_self()->get_cname()); - SIMIX_process_kill(&actor, SIMIX_process_self()); + SIMIX_process_self()->kill(&actor); } } // When a host is turned off, we want to keep only the actors that should restart for when it will boot again.