mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
Merge pull request #3084 from stan680/semaphore-fix
Fix loop condition in semaphore_wait
This commit is contained in:
+1
-1
@@ -210,7 +210,7 @@ gb_internal void semaphore_wait(Semaphore *s) {
|
|||||||
original_count = s->count().load(std::memory_order_relaxed);
|
original_count = s->count().load(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s->count().compare_exchange_strong(original_count, original_count-1, std::memory_order_acquire, std::memory_order_acquire)) {
|
if (s->count().compare_exchange_strong(original_count, original_count-1, std::memory_order_acquire, std::memory_order_acquire)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user