diff options
| author | flysand7 <yyakut.ac@gmail.com> | 2023-11-10 05:33:25 +1100 |
|---|---|---|
| committer | flysand7 <yyakut.ac@gmail.com> | 2023-11-10 05:33:25 +1100 |
| commit | ce43b04688dd91d93a9e9b4a4327eae11bf7feab (patch) | |
| tree | 01ad626b77524a451135467d39a2b1925e173e82 /core/sys/linux | |
| parent | ff1ab74b3c464f34dda1fa3a4308ad40c1276076 (diff) | |
time on arm64
Diffstat (limited to 'core/sys/linux')
| -rw-r--r-- | core/sys/linux/sys.odin | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/sys/linux/sys.odin b/core/sys/linux/sys.odin index e271a30b9..49022da76 100644 --- a/core/sys/linux/sys.odin +++ b/core/sys/linux/sys.odin @@ -754,7 +754,7 @@ vfork :: proc "contextless" () -> Pid { when ODIN_ARCH != .arm64 { return Pid(syscall(SYS_vfork)) } else { - ret := Pid(syscall(SYS_clone, Signal.SIGCHLD)) + return Pid(syscall(SYS_clone, Signal.SIGCHLD)) } } @@ -2179,8 +2179,14 @@ gettid :: proc "contextless" () -> Pid { Available since Linux 1.0. */ time :: proc "contextless" (tloc: ^uint) -> (Errno) { - ret := syscall(SYS_time, tloc) - return Errno(-ret) + when ODIN_ARCH != .arm64 { + ret := syscall(SYS_time, tloc) + return Errno(-ret) + } else { + ts: Time_Spec + ret := syscall(SYS_clock_gettime, Clock_Id.REALTIME, ts) + tloc^ = ts.time_sec + } } /* |