mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
time on arm64
This commit is contained in:
@@ -754,7 +754,7 @@ vfork :: proc "contextless" () -> Pid {
|
|||||||
when ODIN_ARCH != .arm64 {
|
when ODIN_ARCH != .arm64 {
|
||||||
return Pid(syscall(SYS_vfork))
|
return Pid(syscall(SYS_vfork))
|
||||||
} else {
|
} 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.
|
Available since Linux 1.0.
|
||||||
*/
|
*/
|
||||||
time :: proc "contextless" (tloc: ^uint) -> (Errno) {
|
time :: proc "contextless" (tloc: ^uint) -> (Errno) {
|
||||||
ret := syscall(SYS_time, tloc)
|
when ODIN_ARCH != .arm64 {
|
||||||
return Errno(-ret)
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user