+ "Logging specific to SIMIX (synchronization)");
+
+static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout);
+static void SIMIX_synchro_finish(smx_action_t action);
+static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
+ smx_process_t issuer, smx_simcall_t simcall);
+static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
+ smx_simcall_t simcall);
+
+/***************************** Synchro action *********************************/
+
+static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout)
+{
+ XBT_IN("(%p, %f)",smx_host,timeout);
+ smx_action_t action;
+ action = xbt_mallocator_get(simix_global->action_mallocator);
+ action->type = SIMIX_ACTION_SYNCHRO;
+ action->name = xbt_strdup("synchro");
+ action->synchro.sleep =
+ surf_workstation_model->extension.workstation.sleep(smx_host, timeout);
+
+ surf_workstation_model->action_data_set(action->synchro.sleep, action);
+ XBT_OUT();
+ return action;
+}
+
+void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall)
+{
+ XBT_IN("(%p, %p)",process,simcall);
+ switch (simcall->call) {
+
+ case SIMCALL_MUTEX_LOCK:
+ xbt_swag_remove(process, simcall_mutex_lock__get__mutex(simcall)->sleeping);
+ break;
+
+ case SIMCALL_COND_WAIT:
+ xbt_swag_remove(process, simcall_cond_wait__get__cond(simcall)->sleeping);
+ break;
+
+ case SIMCALL_COND_WAIT_TIMEOUT:
+ xbt_swag_remove(process, simcall_cond_wait_timeout__get__cond(simcall)->sleeping);
+ break;