mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-26 17:30:02 +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:
@@ -1,11 +1,9 @@
|
||||
package sync
|
||||
|
||||
import "core:sys/unix"
|
||||
import "core:intrinsics"
|
||||
|
||||
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