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
This commit is contained in:
Michael Lotz 2009-10-20 19:05:35 +00:00
parent 95087bc532
commit 432cc51cc7

View File

@ -5,6 +5,7 @@
#include <locks.h>
#include <syscalls.h>
#include <user_thread.h>
#include <OS.h>
@ -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;