aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-31 23:18:21 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-31 23:18:21 +0100
commit1775e80b41282dfa86c309c84cd1e20b5325f2ce (patch)
tree0f8a6ccf8eefaafeb9ca8b14960401afabc98d36
parente4a93619db05d506cb547312d01cf27f1c119116 (diff)
HACK: Ignore Mutex check
-rw-r--r--src/gb/gb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gb/gb.h b/src/gb/gb.h
index c38c57434..013b39a4d 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -4671,15 +4671,15 @@ gb_inline void gb_mutex_unlock(gbMutex *m) {
i32 recursion;
i32 thread_id = cast(i32)gb_thread_current_id();
- GB_ASSERT(thread_id == gb_atomic32_load(&m->owner));
-
recursion = --m->recursion;
- if (recursion == 0)
+ if (recursion == 0) {
gb_atomic32_store(&m->owner, thread_id);
+ }
if (gb_atomic32_fetch_add(&m->counter, -1) > 1) {
- if (recursion == 0)
+ if (recursion == 0) {
gb_semaphore_release(&m->semaphore);
+ }
}
#endif
}