mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
core/sys/unix: Add syscalls_linux.odin
Linux is in the unfortunate situation where the system call number is architecture specific. This consolidates the system call number definitions in a single location, adds some wrappers, and hopefully fixes the existing non-portable invocations of the syscall intrinsic.
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
//+private
|
||||
package sync2
|
||||
|
||||
import "core:intrinsics"
|
||||
import "core:sys/unix"
|
||||
|
||||
_current_thread_id :: proc "contextless" () -> int {
|
||||
SYS_GETTID :: 186
|
||||
return int(intrinsics.syscall(SYS_GETTID))
|
||||
return unix.sys_gettid()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user