SIMIX_process_on_exit_runall(process);
/* Unregister from the kill timer if any */
- if (process->kill_timer != nullptr)
+ if (process->kill_timer != nullptr) {
SIMIX_timer_remove(process->kill_timer);
+ process->kill_timer = nullptr;
+ }
xbt_os_mutex_acquire(simix_global->mutex);
/** @brief cancels a timer that was added earlier */
void SIMIX_timer_remove(smx_timer_t timer) {
- xbt_heap_rm_elm(simix_timers, timer, timer->getDate());
+ delete static_cast<smx_timer_t>(xbt_heap_rm_elm(simix_timers, timer, timer->getDate()));
}
/** @brief Returns the date at which the timer will trigger (or 0 if nullptr timer) */