summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRene Gollent <anevilyak@gmail.com>2012-11-13 22:42:14 (GMT)
committerAlexander von Gluck IV <kallisti5@unixzen.com>2012-11-14 15:11:23 (GMT)
commit01808ce93907b86718c6293744125682998fbccb (patch)
tree0aef5373c6d86421d8964f3c9de3bc41964c9f4d
parent2acdce3560cb73cfb87c0680319511c67f809561 (diff)
Fix #9148 and probably #9128.hrevr1alpha4-44701
uninit_timers() needs to wait for the timer thread to exit before deleting the timer mutex.
-rw-r--r--src/add-ons/kernel/network/stack/utility.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/add-ons/kernel/network/stack/utility.cpp b/src/add-ons/kernel/network/stack/utility.cpp
index f31656d..c0ab7af 100644
--- a/src/add-ons/kernel/network/stack/utility.cpp
+++ b/src/add-ons/kernel/network/stack/utility.cpp
@@ -681,13 +681,14 @@ void
uninit_timers(void)
{
delete_sem(sTimerWaitSem);
- mutex_lock(&sTimerLock);
-
- mutex_destroy(&sTimerLock);
status_t status;
wait_for_thread(sTimerThread, &status);
+ mutex_lock(&sTimerLock);
+
+ mutex_destroy(&sTimerLock);
+
remove_debugger_command("net_timer", dump_timer);
}