From 432cc51cc745158c8e3744f7716a2bf2da1f950d Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 20 Oct 2009 19:05:35 +0000 Subject: [PATCH] Add small but very important missing detail. Before blocking it didn't set the wait status and therefore would return directly without actually blocking. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33681 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/os/locks.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/os/locks.cpp b/src/system/libroot/os/locks.cpp index 355e0a28fd..c6f4c4b6ad 100644 --- a/src/system/libroot/os/locks.cpp +++ b/src/system/libroot/os/locks.cpp @@ -5,6 +5,7 @@ #include #include +#include #include @@ -77,6 +78,7 @@ rw_lock_wait(rw_lock *lock, bool writer) lock->last_waiter = &waiter; // the rw_lock is locked when entering, release it before blocking + get_user_thread()->wait_status = 1; mutex_unlock(&lock->lock); status_t result;