Fix #9148 and probably #9128.

uninit_timers() needs to wait for the timer thread to exit before
deleting the timer mutex.
This commit is contained in:
Rene Gollent 2012-11-13 17:42:14 -05:00
parent fb7f48a9eb
commit 618ae8a8f6

View File

@ -681,13 +681,14 @@ void
uninit_timers(void) uninit_timers(void)
{ {
delete_sem(sTimerWaitSem); delete_sem(sTimerWaitSem);
mutex_lock(&sTimerLock);
mutex_destroy(&sTimerLock);
status_t status; status_t status;
wait_for_thread(sTimerThread, &status); wait_for_thread(sTimerThread, &status);
mutex_lock(&sTimerLock);
mutex_destroy(&sTimerLock);
remove_debugger_command("net_timer", dump_timer); remove_debugger_command("net_timer", dump_timer);
} }