mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
fix darwin/freebsd
This commit is contained in:
@@ -775,7 +775,7 @@ get_page_size :: proc() -> int {
|
|||||||
get_processor_thread_count :: proc() -> int {
|
get_processor_thread_count :: proc() -> int {
|
||||||
count : int = 0
|
count : int = 0
|
||||||
count_size := size_of(count)
|
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 {
|
if count > 0 {
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ get_page_size :: proc() -> int {
|
|||||||
get_processor_thread_count :: proc() -> int {
|
get_processor_thread_count :: proc() -> int {
|
||||||
count : int = 0
|
count : int = 0
|
||||||
count_size := size_of(count)
|
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 {
|
if count > 0 {
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user