Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "got a "might be clobbered by ‘longjmp’ or ‘vfork’" error when compiled"
[simgrid.git] / src / simix / smx_synchro.c
index e85bfe3..2e71eba 100644 (file)
@@ -96,21 +96,11 @@ static void SIMIX_synchro_finish(smx_action_t action)
   switch (action->state) {
 
     case SIMIX_SRC_TIMEOUT:
-      TRY {
-        THROWF(timeout_error, 0, "Synchro's wait timeout");
-      }
-      CATCH(simcall->issuer->running_ctx->exception) {
-        simcall->issuer->doexception = 1;
-      }
+      SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Synchro's wait timeout");
       break;
 
     case SIMIX_FAILED:
-      TRY {
-        THROWF(host_error, 0, "Host failed");
-      }
-      CATCH(simcall->issuer->running_ctx->exception) {
-        simcall->issuer->doexception = 1;
-      }
+      SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
       break;
 
     default:
@@ -119,6 +109,7 @@ static void SIMIX_synchro_finish(smx_action_t action)
   }
 
   SIMIX_synchro_stop_waiting(simcall->issuer, simcall);
+  simcall->issuer->waiting_action = NULL;
   SIMIX_synchro_destroy(action);
   SIMIX_simcall_answer(simcall);
   XBT_OUT();
@@ -402,7 +393,7 @@ void SIMIX_cond_destroy(smx_cond_t cond)
 /** @brief Initialize a semaphore */
 smx_sem_t SIMIX_sem_init(unsigned int value)
 {
-  XBT_IN("(%d)",value);
+  XBT_IN("(%u)",value);
   s_smx_process_t p;
 
   smx_sem_t sem = xbt_new0(s_smx_sem_t, 1);