diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2023-03-04 22:40:14 -0800 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2023-03-04 22:40:14 -0800 |
| commit | afaa5f2deb77fd92e6dee78fe90bc19714656456 (patch) | |
| tree | 44e9f58ef2b1abc9f9ec79d9a4adb3ed43e8f49c | |
| parent | 0674b1b6ee0ea69a0e2982ed895e52e7c2324949 (diff) | |
add null-impl for tsc_frequency for alt-platforms
| -rw-r--r-- | core/time/perf.odin | 6 | ||||
| -rw-r--r-- | core/time/tsc_openbsd.odin | 7 | ||||
| -rw-r--r-- | core/time/tsc_windows.odin | 7 |
3 files changed, 6 insertions, 14 deletions
diff --git a/core/time/perf.odin b/core/time/perf.odin index e51b17441..69f7eceaa 100644 --- a/core/time/perf.odin +++ b/core/time/perf.odin @@ -56,6 +56,12 @@ when ODIN_ARCH == .amd64 { } } +when ODIN_OS != .Darwin && ODIN_OS != .Linux && ODIN_OS != .FreeBSD { + _get_tsc_frequency :: proc "contextless" () -> (u64, bool) { + return 0, false + } +} + has_invariant_tsc :: proc "contextless" () -> bool { when ODIN_ARCH == .amd64 { return x86_has_invariant_tsc() diff --git a/core/time/tsc_openbsd.odin b/core/time/tsc_openbsd.odin deleted file mode 100644 index ab126d5c1..000000000 --- a/core/time/tsc_openbsd.odin +++ /dev/null @@ -1,7 +0,0 @@ -//+private -//+build openbsd -package time - -_get_tsc_frequency :: proc "contextless" () -> (u64, bool) { - return 0, false -} diff --git a/core/time/tsc_windows.odin b/core/time/tsc_windows.odin deleted file mode 100644 index 7f7be6393..000000000 --- a/core/time/tsc_windows.odin +++ /dev/null @@ -1,7 +0,0 @@ -//+private -//+build windows -package time - -_get_tsc_frequency :: proc "contextless" () -> (u64, bool) { - return 0, false -} |