mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 17:34:34 +00:00
16 lines
292 B
Odin
16 lines
292 B
Odin
//+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))
|
|
}
|