mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-30 17:21:49 -07:00
Propper thread identification on NetBSD
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
//+private
|
||||
package sync
|
||||
|
||||
import "core:sys/unix"
|
||||
foreign import libc "system:c"
|
||||
|
||||
foreign libc {
|
||||
_lwp_self :: proc "c" () -> i32 ---
|
||||
}
|
||||
|
||||
_current_thread_id :: proc "contextless" () -> int {
|
||||
return cast(int) unix.pthread_self()
|
||||
return int(_lwp_self())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user