fix tabbing

This commit is contained in:
Colin Davidson
2025-07-07 14:36:31 -07:00
parent 389439ccb9
commit 2dae1d8a41
2 changed files with 7 additions and 11 deletions

View File

@@ -5,10 +5,6 @@ foreign import mach "system:System.framework"
import "core:c"
import "base:intrinsics"
// NOTE(tetra): Unclear whether these should be aligned 16 or not.
// However all other sync primitives are aligned for robustness.
// I cannot currently align these though.
// See core/sys/unix/pthread_linux.odin/pthread_t.
mach_port_t :: distinct c.uint
task_t :: mach_port_t

View File

@@ -4,13 +4,13 @@ package time
import "core:sys/unix"
_get_tsc_frequency :: proc "contextless" () -> (freq: u64, ok: bool) {
if ODIN_ARCH == .amd64 {
unix.sysctlbyname("machdep.tsc.frequency", &freq) or_return
} else if ODIN_ARCH == .arm64 {
unix.sysctlbyname("hw.tbfrequency", &freq) or_return
} else {
return
}
if ODIN_ARCH == .amd64 {
unix.sysctlbyname("machdep.tsc.frequency", &freq) or_return
} else if ODIN_ARCH == .arm64 {
unix.sysctlbyname("hw.tbfrequency", &freq) or_return
} else {
return
}
ok = true
return
}