Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sanitize the prototype of Actor::on_exit() callbacks
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 4 Mar 2019 23:38:28 +0000 (00:38 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 4 Mar 2019 23:53:05 +0000 (00:53 +0100)
commit08e94eb0482589e4b287cbea301b84daf52635bd
tree4678cdb4fc138d7dac95aefe372bc4f0f714809b
parent55e6d07cfba4948a918765e9d6fd2801d3639a4a
Sanitize the prototype of Actor::on_exit() callbacks

Changes on_exit(function<void(int failed, void*data)>, data)
into    on_exit(function<void(bool failed)>)

So, we are using bool for boolean values, and we don't force the user
to build a closure on void* data manually. If you want to pass a data
to the callback, just use the C++ formalism: [data](bool failed){...}

Other changes on the way (that excalated quickly)
- Document some recent changes to the internals in ChangeLog
- Document this_actor::on_exit() and Actor::on_exit() in doxygen
- Also sanitize the prototype of MSG_process_on_exit(). Was taking a
  (void*,void*) function; now takes a (int, void*) one. This was too
  weird to use void* to denote integers -- I actually doubt it ever
  worked the way it was written, but the tests are too poor to be
  sure: the only usage of this function ignores the return value.
- Also add a new test in activity-lifetime: test_sleep_restart_end
  Commented for now as it breaks miserably.
17 files changed:
ChangeLog
examples/s4u/actor-exiting/s4u-actor-exiting.cpp
examples/s4u/actor-kill/s4u-actor-kill.cpp
examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp
include/simgrid/msg.h
include/simgrid/s4u/Actor.hpp
include/simgrid/simix.h
include/xbt/function_types.h
src/bindings/python/simgrid_python.cpp
src/instr/instr_platform.cpp
src/msg/msg_process.cpp
src/s4u/s4u_Actor.cpp
src/simix/ActorImpl.cpp
src/simix/ActorImpl.hpp
teshsuite/msg/process-lifetime/process-lifetime.c
teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp
teshsuite/s4u/pid/pid.cpp