mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 12:18:15 +00:00
Remove os dependency in primitives_openbsd.odin
This commit is contained in:
@@ -2,8 +2,14 @@
|
|||||||
//+private
|
//+private
|
||||||
package sync
|
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 {
|
_current_thread_id :: proc "contextless" () -> int {
|
||||||
return os.current_thread_id()
|
return _unix_getthrid()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user