Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Better fix for FG#50
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 10 May 2020 11:47:44 +0000 (13:47 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 10 May 2020 11:56:18 +0000 (13:56 +0200)
commite599303392d7cf5795927906bc44619ab60dfcaf
tree4ed479ac2a7e5acf907cd62a62f86ef4bfd0935a
parentde6ca4b1c40a83ccad923a1de8a5ac5e75863a7a
Better fix for FG#50

- The previous solution was not allowing the suspended actor to be resumed properly
- Instead of going for a complex story where we create an activity on
  which to suspend the actor, simply unschedule it on suspend(), and
  explicitely reschedule it on resume()
- This is much easier since we don't have to save and restore the
  simcall of the suspended actor, even if the price to pay is the
  explicit simix_global->actors_to_run.push_back(this); in resume()
  of which I'm not a big fan.

Fixes https://framagit.org/simgrid/simgrid/-/issues/50
src/kernel/actor/ActorImpl.cpp
teshsuite/s4u/actor-suspend/actor-suspend.cpp
teshsuite/s4u/actor-suspend/actor-suspend.tesh