From: Arnaud Giersch Date: Tue, 11 Mar 2014 08:40:54 +0000 (+0100) Subject: Check if process was suspended while it was sleeping. X-Git-Tag: v3_11~220^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cce8762ad47e27c76f17a02e57b6ecf8b0e4c815?hp=0dd446376dd8189e5a2e4f4041509e9d056ebfd8 Check if process was suspended while it was sleeping. Closes bug #17098. --- diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index 1ef7148c37..8378a66790 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -742,7 +742,13 @@ void SIMIX_post_process_sleep(smx_action_t action) } simcall_process_sleep__set__result(simcall, state); simcall->issuer->waiting_action = NULL; - SIMIX_simcall_answer(simcall); + if (simcall->issuer->suspended) { + XBT_DEBUG("Wait! This process is suspended and can't wake up now."); + simcall->issuer->suspended = 0; + SIMIX_pre_process_suspend(simcall, simcall->issuer); + } else { + SIMIX_simcall_answer(simcall); + } } SIMIX_process_sleep_destroy(action);