mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
more windows fixes
This commit is contained in:
@@ -130,7 +130,7 @@ get_page_size :: proc() -> int {
|
|||||||
|
|
||||||
@(private)
|
@(private)
|
||||||
_processor_core_count :: proc() -> int {
|
_processor_core_count :: proc() -> int {
|
||||||
length : c.int = 0
|
length : win32.DWORD = 0
|
||||||
result := win32.GetLogicalProcessorInformation(nil, &length)
|
result := win32.GetLogicalProcessorInformation(nil, &length)
|
||||||
|
|
||||||
thread_count := 0
|
thread_count := 0
|
||||||
@@ -140,9 +140,9 @@ _processor_core_count :: proc() -> int {
|
|||||||
result = win32.GetLogicalProcessorInformation(&processors[0], &length)
|
result = win32.GetLogicalProcessorInformation(&processors[0], &length)
|
||||||
if result {
|
if result {
|
||||||
for processor in processors {
|
for processor in processors {
|
||||||
if processor.Relationship == win32.RelationProcessorCore {
|
if processor.Relationship == .RelationProcessorCore {
|
||||||
thread := intrinsics.count_ones(processor.ProcessorMask)
|
thread := intrinsics.count_ones(processor.ProcessorMask)
|
||||||
thread_count += thread
|
thread_count += int(thread)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user