void SIMIX_synchro_finish(smx_synchro_t synchro)
{
XBT_IN("(%p)",synchro);
- smx_simcall_t simcall = (smx_simcall_t) xbt_fifo_shift(synchro->simcalls);
+ smx_simcall_t simcall = synchro->simcalls.front();
+ synchro->simcalls.pop_front();
switch (synchro->state) {
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
synchro = SIMIX_synchro_wait(process->host, -1);
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
xbt_swag_insert(simcall->issuer, mutex->sleeping);
} else {
}
synchro = SIMIX_synchro_wait(issuer->host, timeout);
- xbt_fifo_unshift(synchro->simcalls, simcall);
+ synchro->simcalls.push_front(simcall);
issuer->waiting_synchro = synchro;
xbt_swag_insert(simcall->issuer, cond->sleeping);
XBT_OUT();
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);
+ synchro->simcalls.push_front(simcall);
issuer->waiting_synchro = synchro;
xbt_swag_insert(issuer, sem->sleeping);
} else {