From: Arnaud Giersch Date: Fri, 1 Jun 2018 12:42:56 +0000 (+0200) Subject: Use new style SIMIX_process_on_exit(). X-Git-Tag: v3.20~175 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/36b3b8b80bee4178c77b22f6130b44b542660eea Use new style SIMIX_process_on_exit(). --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index caabcb26ca..b83645a3d7 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -141,7 +141,7 @@ ActorImpl::~ActorImpl() delete this->context; } -static int dying_daemon(void* exit_status, void* data) +static void dying_daemon(int /*exit_status*/, void* data) { std::vector* vect = &simix_global->daemons; @@ -151,9 +151,8 @@ static int dying_daemon(void* exit_status, void* data) /* Don't move the whole content since we don't really care about the order */ std::swap(*it, vect->back()); vect->pop_back(); - - return 0; } + /** This process will be terminated automatically when the last non-daemon process finishes */ void ActorImpl::daemonize() { @@ -652,12 +651,11 @@ smx_activity_t SIMIX_process_join(smx_actor_t issuer, smx_actor_t process, doubl smx_activity_t res = issuer->sleep(timeout); intrusive_ptr_add_ref(res.get()); SIMIX_process_on_exit(process, - [](void*, void* arg) { + [](int, void* arg) { auto sleep = static_cast(arg); if (sleep->surf_sleep) sleep->surf_sleep->finish(simgrid::kernel::resource::Action::State::FINISHED); intrusive_ptr_release(sleep); - return 0; }, res.get()); return res;