fix darwin/freebsd

This commit is contained in:
Colin Davidson
2023-01-05 01:14:51 -08:00
parent 8f39c45e9b
commit 0484bdbb7e
2 changed files with 2 additions and 2 deletions

View File

@@ -775,7 +775,7 @@ get_page_size :: proc() -> int {
get_processor_thread_count :: proc() -> int {
count : int = 0
count_size := size_of(count)
if _sysctlbyname("hw.logicalcpu", rawptr(count), rawptr(count_size), 0, 0) == 0 {
if _sysctlbyname("hw.logicalcpu", &count, &count_size, nil, 0) == 0 {
if count > 0 {
return count
}

View File

@@ -706,7 +706,7 @@ get_page_size :: proc() -> int {
get_processor_thread_count :: proc() -> int {
count : int = 0
count_size := size_of(count)
if _sysctlbyname("hw.logicalcpu", rawptr(count), rawptr(count_size), 0, 0) == 0 {
if _sysctlbyname("hw.logicalcpu", &count, &count_size, nil, 0) == 0 {
if count > 0 {
return count
}