Strip semicolons in core which were missing

This commit is contained in:
gingerBill
2021-09-08 13:12:38 +01:00
parent d4f5ef046d
commit ca33cb990b
27 changed files with 1296 additions and 1287 deletions
+19 -19
View File
@@ -9,13 +9,13 @@ import "core:intrinsics"
foreign import pthread "System.framework"
_current_thread_id :: proc "contextless" () -> int {
tid: u64;
tid: u64
// NOTE(Oskar): available from OSX 10.6 and iOS 3.2.
// For older versions there is `syscall(SYS_thread_selfid)`, but not really
// the same thing apparently.
foreign pthread { pthread_threadid_np :: proc "c" (rawptr, ^u64) -> c.int ---; }
pthread_threadid_np(nil, &tid);
return int(tid);
foreign pthread { pthread_threadid_np :: proc "c" (rawptr, ^u64) -> c.int --- }
pthread_threadid_np(nil, &tid)
return int(tid)
}
foreign {
@@ -26,38 +26,38 @@ foreign {
}
_atomic_try_wait_slow :: proc(ptr: ^u32, val: u32) {
history: uint = 10;
history: uint = 10
for {
// Exponential wait
_darwin_usleep(history >> 2);
history += history >> 2;
_darwin_usleep(history >> 2)
history += history >> 2
if history > (1 << 10) {
history = 1 << 10;
history = 1 << 10
}
if atomic_load(ptr) != val {
break;
break
}
}
}
_atomic_wait :: proc(ptr: ^u32, val: u32) {
if intrinsics.expect(atomic_load(ptr) != val, true) {
return;
return
}
for i in 0..<16 {
if atomic_load(ptr) != val {
return;
return
}
if i < 12 {
intrinsics.cpu_relax();
intrinsics.cpu_relax()
} else {
_darwin_sched_yield();
_darwin_sched_yield()
}
}
for val == atomic_load(ptr) {
_atomic_try_wait_slow(ptr, val);
_atomic_try_wait_slow(ptr, val)
}
}
@@ -73,7 +73,7 @@ _mutex_unlock :: proc(m: ^Mutex) {
}
_mutex_try_lock :: proc(m: ^Mutex) -> bool {
return false;
return false
}
_RW_Mutex :: struct {
@@ -86,7 +86,7 @@ _rw_mutex_unlock :: proc(rw: ^RW_Mutex) {
}
_rw_mutex_try_lock :: proc(rw: ^RW_Mutex) -> bool {
return false;
return false
}
_rw_mutex_shared_lock :: proc(rw: ^RW_Mutex) {
@@ -96,7 +96,7 @@ _rw_mutex_shared_unlock :: proc(rw: ^RW_Mutex) {
}
_rw_mutex_try_shared_lock :: proc(rw: ^RW_Mutex) -> bool {
return false;
return false
}
@@ -110,7 +110,7 @@ _recursive_mutex_unlock :: proc(m: ^Recursive_Mutex) {
}
_recursive_mutex_try_lock :: proc(m: ^Recursive_Mutex) -> bool {
return false;
return false
}
@@ -123,7 +123,7 @@ _cond_wait :: proc(c: ^Cond, m: ^Mutex) {
}
_cond_wait_with_timeout :: proc(c: ^Cond, m: ^Mutex, timeout: time.Duration) -> bool {
return false;
return false
}
_cond_signal :: proc(c: ^Cond) {