diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-18 18:58:41 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-18 18:58:41 +0100 |
| commit | 65f079ebc474f9decc7afb222630c04b4da32690 (patch) | |
| tree | 789058f2ed95b8cf4433445f169435af1cc6707c /core/sync_linux.odin | |
| parent | d16aa794921efd3c8e752645f3e5f922abc3aee8 (diff) | |
Remove `atomic`, `++`, and `--`
Diffstat (limited to 'core/sync_linux.odin')
| -rw-r--r-- | core/sync_linux.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/sync_linux.odin b/core/sync_linux.odin index a6c1338da..9e7f20d51 100644 --- a/core/sync_linux.odin +++ b/core/sync_linux.odin @@ -56,7 +56,7 @@ mutex_lock :: proc(m: ^Mutex) { } } atomics.store(&m._owner, thread_id); - m._recursion++; + m._recursion += 1; } mutex_try_lock :: proc(m: ^Mutex) -> bool { thread_id := current_thread_id(); @@ -72,7 +72,7 @@ mutex_try_lock :: proc(m: ^Mutex) -> bool { } atomics.store(&m._owner, thread_id); } - m._recursion++; + m._recursion += 1; return true; } mutex_unlock :: proc(m: ^Mutex) { @@ -80,7 +80,7 @@ mutex_unlock :: proc(m: ^Mutex) { thread_id := current_thread_id(); assert(thread_id == atomics.load(&m._owner)); - m._recursion--; + m._recursion -= 1; recursion = m._recursion; if recursion == 0 { atomics.store(&m._owner, thread_id); |