diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-01-31 20:20:54 +0100 |
|---|---|---|
| committer | Laytan <laytanlaats@hotmail.com> | 2024-02-05 16:54:22 +0100 |
| commit | ca6300c8600734f9f294ddc8533f817211ad4cb5 (patch) | |
| tree | cddffbdc07024efd0a480cd35c24271db341dd30 /core/sys/linux | |
| parent | 1ebb7f8e9dd337f482f4ce04563b80a00c47443e (diff) | |
spall instrumentation
Diffstat (limited to 'core/sys/linux')
| -rw-r--r-- | core/sys/linux/helpers.odin | 1 | ||||
| -rw-r--r-- | core/sys/linux/sys.odin | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/sys/linux/helpers.odin b/core/sys/linux/helpers.odin index 9bee57c11..69c648bf1 100644 --- a/core/sys/linux/helpers.odin +++ b/core/sys/linux/helpers.odin @@ -1,4 +1,5 @@ //+build linux +//+no-instrumentation package linux import "base:intrinsics" diff --git a/core/sys/linux/sys.odin b/core/sys/linux/sys.odin index 8a93f0a47..869ce88e3 100644 --- a/core/sys/linux/sys.odin +++ b/core/sys/linux/sys.odin @@ -1,3 +1,4 @@ +//+no-instrumentation package linux import "base:intrinsics" @@ -2383,7 +2384,11 @@ timer_delete :: proc "contextless" (timer: Timer) -> (Errno) { // TODO(flysand): clock_settime -// TODO(flysand): clock_gettime +clock_gettime :: proc "contextless" (clock: Clock_Id) -> (ts: Time_Spec, err: Errno) { + ret := syscall(SYS_clock_gettime, clock, &ts) + err = Errno(-ret) + return +} // TODO(flysand): clock_getres |