mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 11:20:08 +00:00
HACK: Ignore Mutex check
This commit is contained in:
+4
-4
@@ -4671,15 +4671,15 @@ gb_inline void gb_mutex_unlock(gbMutex *m) {
|
|||||||
i32 recursion;
|
i32 recursion;
|
||||||
i32 thread_id = cast(i32)gb_thread_current_id();
|
i32 thread_id = cast(i32)gb_thread_current_id();
|
||||||
|
|
||||||
GB_ASSERT(thread_id == gb_atomic32_load(&m->owner));
|
|
||||||
|
|
||||||
recursion = --m->recursion;
|
recursion = --m->recursion;
|
||||||
if (recursion == 0)
|
if (recursion == 0) {
|
||||||
gb_atomic32_store(&m->owner, thread_id);
|
gb_atomic32_store(&m->owner, thread_id);
|
||||||
|
}
|
||||||
|
|
||||||
if (gb_atomic32_fetch_add(&m->counter, -1) > 1) {
|
if (gb_atomic32_fetch_add(&m->counter, -1) > 1) {
|
||||||
if (recursion == 0)
|
if (recursion == 0) {
|
||||||
gb_semaphore_release(&m->semaphore);
|
gb_semaphore_release(&m->semaphore);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user