Browse Source

add null-impl for tsc_frequency for alt-platforms

Colin Davidson 2 years ago
parent
commit
afaa5f2deb
3 changed files with 6 additions and 14 deletions
  1. 6 0
      core/time/perf.odin
  2. 0 7
      core/time/tsc_openbsd.odin
  3. 0 7
      core/time/tsc_windows.odin

+ 6 - 0
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 {
 has_invariant_tsc :: proc "contextless" () -> bool {
 	when ODIN_ARCH == .amd64 {
 	when ODIN_ARCH == .amd64 {
 		return x86_has_invariant_tsc()
 		return x86_has_invariant_tsc()

+ 0 - 7
core/time/tsc_openbsd.odin

@@ -1,7 +0,0 @@
-//+private
-//+build openbsd
-package time
-
-_get_tsc_frequency :: proc "contextless" () -> (u64, bool) {
-	return 0, false
-}

+ 0 - 7
core/time/tsc_windows.odin

@@ -1,7 +0,0 @@
-//+private
-//+build windows
-package time
-
-_get_tsc_frequency :: proc "contextless" () -> (u64, bool) {
-	return 0, false
-}