diff --git a/core/sync/primitives_openbsd.odin b/core/sync/primitives_openbsd.odin index 4072a14e8..ff3ff837f 100644 --- a/core/sync/primitives_openbsd.odin +++ b/core/sync/primitives_openbsd.odin @@ -2,8 +2,14 @@ //+private package sync -import "core:os" +foreign import libc "system:c" + +@(default_calling_convention="c") +foreign libc { + @(link_name="getthrid", private="file") + _unix_getthrid :: proc() -> int --- +} _current_thread_id :: proc "contextless" () -> int { - return os.current_thread_id() + return _unix_getthrid() }