smx_simcall_t simcall = synchro->simcalls_.front();
synchro->simcalls_.pop_front();
- if (synchro->state_ != SIMIX_SRC_TIMEOUT) {
- if (synchro->state_ == SIMIX_FAILED)
- simcall->issuer->context_->iwannadie = true;
- else
- THROW_IMPOSSIBLE;
- }
-
SIMIX_synchro_stop_waiting(simcall->issuer, simcall);
simcall->issuer->waiting_synchro = nullptr;
- SIMIX_simcall_answer(simcall);
+
+ if (synchro->state_ != SIMIX_SRC_TIMEOUT) {
+ xbt_assert(synchro->state_ == SIMIX_FAILED);
+ simcall->issuer->context_->iwannadie = true;
+ } else {
+ SIMIX_simcall_answer(simcall);
+ }
XBT_OUT();
}
return sem;
}
-/** @brief Destroys a semaphore */
-void SIMIX_sem_destroy(smx_sem_t sem)
-{
- XBT_IN("(%p)",sem);
- XBT_DEBUG("Destroy semaphore %p", sem);
- if (sem != nullptr) {
- xbt_assert(sem->sleeping.empty(), "Cannot destroy semaphore since someone is still using it");
- delete sem;
- }
- XBT_OUT();
-}
-
/** @brief release the semaphore
*
* Unlock a process waiting on the semaphore.