X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Frwlock.c;h=a6aeca885e977bd76fd2708c32b3dede4c73e97a;hb=0e844bc15a212d0e933b6243a9a9964ab7925c4f;hp=979df4ac70909a15e0d83883f20191e0fdad82fb;hpb=3734719792d583e82208729b7142133745f12095;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/rwlock.c b/KernelLand/Kernel/rwlock.c index 979df4ac..a6aeca88 100644 --- a/KernelLand/Kernel/rwlock.c +++ b/KernelLand/Kernel/rwlock.c @@ -48,7 +48,7 @@ int RWLock_AcquireRead(tRWLock *Lock) SHORTREL( &glThreadListLock ); SHORTREL( &Lock->Protector ); - while(us->Status == THREAD_STAT_RWLOCKSLEEP) Threads_Yield(); + Threads_int_WaitForStatusEnd(THREAD_STAT_RWLOCKSLEEP); // We're only woken when we get the lock // TODO: Handle when this isn't the case us->WaitPointer = NULL; @@ -90,7 +90,7 @@ int RWLock_AcquireWrite(tRWLock *Lock) SHORTREL( &glThreadListLock ); SHORTREL( &Lock->Protector ); - while(us->Status == THREAD_STAT_RWLOCKSLEEP) Threads_Yield(); + Threads_int_WaitForStatusEnd(THREAD_STAT_RWLOCKSLEEP); us->WaitPointer = NULL; } else