From 2fda3cf9880cee1c9dfae4ac34b1c10aefbb5a8f Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 25 May 2023 12:17:39 +0100 Subject: [PATCH] Remove os dependency in primitives_openbsd.odin --- core/sync/primitives_openbsd.odin | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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() }