mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
Add some missing files to sync2 for linux and darwin
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//+build linux
|
||||
//+private
|
||||
package sync2
|
||||
|
||||
// TODO(bill): remove libc
|
||||
foreign import libc "system:c"
|
||||
|
||||
_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));
|
||||
}
|
||||
Reference in New Issue
Block a user