- smx_action_t sync_act = NULL;
-
- DEBUG2("Wait semaphore %p (timeout:%f)", sem, timeout);
- if(sem->value <= 0){
- sync_act = SIMIX_synchro_wait(issuer->smx_host, timeout);
- xbt_fifo_unshift(sync_act->request_list, req);
- issuer->waiting_action = sync_act;
+ XBT_IN("(%p, %f, %p, %p)",sem,timeout,issuer,simcall);
+ smx_synchro_t synchro = NULL;
+
+ XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout);
+ if (sem->value <= 0) {
+ synchro = SIMIX_synchro_wait(issuer->host, timeout);
+ xbt_fifo_unshift(synchro->simcalls, simcall);
+ issuer->waiting_synchro = synchro;