diff options
| author | Yawning Angel <yawning@schwanenlied.me> | 2021-11-12 06:22:17 +0000 |
|---|---|---|
| committer | Yawning Angel <yawning@schwanenlied.me> | 2021-11-17 14:00:00 +0000 |
| commit | 61c581baeb94ac73cbb25e93af2710d12e15f25c (patch) | |
| tree | 5338661017bfda2596d2ee408b564dac162c7273 /core/sync/sync_linux.odin | |
| parent | 6c4c9aef618dcf3932be88ca6df65164145b7cea (diff) | |
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.
Diffstat (limited to 'core/sync/sync_linux.odin')
| -rw-r--r-- | core/sync/sync_linux.odin | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/sync/sync_linux.odin b/core/sync/sync_linux.odin index fe856df94..340437c11 100644 --- a/core/sync/sync_linux.odin +++ b/core/sync/sync_linux.odin @@ -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() } |