derp. raw-syscalls

This commit is contained in:
Colin Davidson
2023-02-19 20:44:00 -08:00
parent e559cf32fe
commit 9c9300ed58
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -1537,7 +1537,6 @@ MAP_SHARED :: 0x1
MAP_PRIVATE :: 0x2
MAP_SHARED_VALIDATE :: 0x3
MAP_ANONYMOUS :: 0x20
MAP_FAILED :: -1
// mremap flags
MREMAP_MAYMOVE :: 1
+1 -1
View File
@@ -25,7 +25,7 @@ _get_tsc_frequency :: proc "contextless" () -> u64 {
page_size : uint = 4096
ret := unix.sys_mmap(nil, page_size, unix.PROT_READ, unix.MAP_SHARED, fd, 0)
if ret == unix.MAP_FAILED {
if ret < 0 && > -4096 {
frequency = 1
return 0
}