mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-13 22:03:42 +00:00
BSDs
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#+private
|
||||
#+build freebsd
|
||||
package os2
|
||||
|
||||
import "core:c"
|
||||
|
||||
foreign import libc "system:c"
|
||||
foreign import dl "system:dl"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#+private
|
||||
#+build netbsd
|
||||
package os2
|
||||
|
||||
import "core:c"
|
||||
foreign import libc "system:c"
|
||||
|
||||
@(private)
|
||||
foreign libc {
|
||||
_lwp_self :: proc() -> i32 ---
|
||||
_lwp_self :: proc() -> i32 ---
|
||||
|
||||
@(link_name="sysctlbyname")
|
||||
@@ -12,7 +15,7 @@ foreign libc {
|
||||
|
||||
@(require_results)
|
||||
_get_current_thread_id :: proc "contextless" () -> int {
|
||||
}
|
||||
return int(_lwp_self())
|
||||
}
|
||||
|
||||
_get_processor_core_count :: proc() -> int {
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#+private
|
||||
#+build openbsd
|
||||
package os2
|
||||
|
||||
import "core:c"
|
||||
|
||||
foreign import libc "system:c"
|
||||
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
|
||||
Reference in New Issue
Block a user