condvar: fix embarrassing typo that prevented it from actually working

This commit is contained in:
fincs 2020-07-23 02:45:39 +02:00
parent 958e0c74ea
commit 4866df79a5
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60

View File

@ -159,7 +159,7 @@ static inline void CondVar_BeginWait(CondVar* cv, LightLock* lock)
s32 val; s32 val;
do do
val = __ldrex(cv) - 1; val = __ldrex(cv) - 1;
while (!__strex(cv, val)); while (__strex(cv, val));
LightLock_Unlock(lock); LightLock_Unlock(lock);
} }
@ -180,7 +180,7 @@ static inline bool CondVar_EndWait(CondVar* cv, s32 num_threads)
else else
val = 0; val = 0;
} }
} while (!__strex(cv, val)); } while (__strex(cv, val));
return hasWaiters; return hasWaiters;
} }