mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 11:50:07 +00:00
Update core:sync/sync2 to have a generic Futex interface, and implement the calls appropriately for each platform
This commit is contained in:
@@ -2,14 +2,9 @@
|
||||
//+private
|
||||
package sync2
|
||||
|
||||
// TODO(bill): remove libc
|
||||
foreign import libc "system:c"
|
||||
import "core:intrinsics"
|
||||
|
||||
_current_thread_id :: proc "contextless" () -> int {
|
||||
foreign libc {
|
||||
syscall :: proc(number: i32, #c_vararg args: ..any) -> i32 ---
|
||||
}
|
||||
|
||||
SYS_GETTID :: 186
|
||||
return int(syscall(SYS_GETTID))
|
||||
return int(intrinsics.syscall(SYS_GETTID))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user