[haiku-commits] haiku.r1alpha4: hrevr1alpha4-44701 - src/add-ons/kernel/network/stack

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 14 Nov 2012 16:11:09 +0100 (CET)

hrevr1alpha4-44701 adds 1 changeset to branch 'r1alpha4'
old head: 2acdce3560cb73cfb87c0680319511c67f809561
new head: 01808ce93907b86718c6293744125682998fbccb

----------------------------------------------------------------------------

01808ce: Fix #9148 and probably #9128.
  
  uninit_timers() needs to wait for the timer thread to exit before
  deleting the timer mutex.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrevr1alpha4-44701
Commit:      01808ce93907b86718c6293744125682998fbccb
URL:         http://cgit.haiku-os.org/haiku/commit/?id=01808ce
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Nov 13 22:42:14 2012 UTC
Committer:   Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Wed Nov 14 15:11:23 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/9128
Ticket:      https://dev.haiku-os.org/ticket/9148

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 3 deletions(-)
src/add-ons/kernel/network/stack/utility.cpp | 7 ++++---

----------------------------------------------------------------------------

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);
 }
 


Other related posts: