git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://cadel.mutabah.net/acess2
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
rwlock.c
diff --git
a/KernelLand/Kernel/rwlock.c
b/KernelLand/Kernel/rwlock.c
index
c39ce10
..
1fd6459
100644
(file)
--- a/
KernelLand/Kernel/rwlock.c
+++ b/
KernelLand/Kernel/rwlock.c
@@
-21,7
+21,8
@@
int RWLock_AcquireRead(tRWLock *Lock)
SHORTLOCK( &Lock->Protector );
// Check if the lock is already held by a writer
SHORTLOCK( &Lock->Protector );
// Check if the lock is already held by a writer
- if( Lock->Owner )
+ // - OR, there's a writer waiting to write
+ if( Lock->Owner || Lock->WriterWaiting )
{
LOG("Waiting");
Threads_int_Sleep(THREAD_STAT_RWLOCKSLEEP, Lock, 0,
{
LOG("Waiting");
Threads_int_Sleep(THREAD_STAT_RWLOCKSLEEP, Lock, 0,
UCC
git Repository :: git.ucc.asn.au