aboutsummaryrefslogtreecommitdiff
path: root/core/sync/sync_linux.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-08 13:12:38 +0100
committergingerBill <bill@gingerbill.org>2021-09-08 13:12:38 +0100
commitca33cb990b5a05829067e18ea24bcb36a75aba67 (patch)
treec3fa66a18cee6f44ea409e62e3878295f881c49a /core/sync/sync_linux.odin
parentd4f5ef046da7d1d3402f671e84fa483c71a3b26f (diff)
Strip semicolons in core which were missing
Diffstat (limited to 'core/sync/sync_linux.odin')
-rw-r--r--core/sync/sync_linux.odin14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/sync/sync_linux.odin b/core/sync/sync_linux.odin
index 2ec6d45a0..fe856df94 100644
--- a/core/sync/sync_linux.odin
+++ b/core/sync/sync_linux.odin
@@ -4,8 +4,8 @@ import "core:sys/unix"
import "core:intrinsics"
current_thread_id :: proc "contextless" () -> int {
- SYS_GETTID :: 186;
- return int(intrinsics.syscall(SYS_GETTID));
+ SYS_GETTID :: 186
+ return int(intrinsics.syscall(SYS_GETTID))
}
@@ -18,21 +18,21 @@ Semaphore :: struct #align 16 {
}
semaphore_init :: proc(s: ^Semaphore, initial_count := 0) {
- assert(unix.sem_init(&s.handle, 0, u32(initial_count)) == 0);
+ assert(unix.sem_init(&s.handle, 0, u32(initial_count)) == 0)
}
semaphore_destroy :: proc(s: ^Semaphore) {
- assert(unix.sem_destroy(&s.handle) == 0);
- s.handle = {};
+ assert(unix.sem_destroy(&s.handle) == 0)
+ s.handle = {}
}
semaphore_post :: proc(s: ^Semaphore, count := 1) {
// NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
for in 0..<count {
- assert(unix.sem_post(&s.handle) == 0);
+ assert(unix.sem_post(&s.handle) == 0)
}
}
semaphore_wait_for :: proc(s: ^Semaphore) {
- assert(unix.sem_wait(&s.handle) == 0);
+ assert(unix.sem_wait(&s.handle) == 0)
}