aboutsummaryrefslogtreecommitdiff
path: root/core/sync
diff options
context:
space:
mode:
Diffstat (limited to 'core/sync')
-rw-r--r--core/sync/primitives_netbsd.odin8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/sync/primitives_netbsd.odin b/core/sync/primitives_netbsd.odin
index 042e744e8..594f2ff5c 100644
--- a/core/sync/primitives_netbsd.odin
+++ b/core/sync/primitives_netbsd.odin
@@ -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())
}