From 171d5b4012e429cf4f341cf6b5f8020cbad8820b Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Fri, 6 Jan 2023 13:45:21 -0800 Subject: [PATCH] more windows kerfuffle --- core/os/os_windows.odin | 3 ++- core/sys/windows/kernel32.odin | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin index 45be28e9f..aef7d44d5 100644 --- a/core/os/os_windows.odin +++ b/core/os/os_windows.odin @@ -4,6 +4,7 @@ package os import win32 "core:sys/windows" import "core:runtime" import "core:intrinsics" +import "core:c" Handle :: distinct uintptr File_Time :: distinct u64 @@ -139,7 +140,7 @@ _processor_core_count :: proc() -> int { result = win32.GetLogicalProcessorInformation(&processors[0], &length) if result { for processor in processors { - if processor.Relationship == windows.RelationProcessorCore { + if processor.Relationship == win32.RelationProcessorCore { thread := intrinsics.count_ones(processor.ProcessorMask) thread_count += thread } diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin index 2a74ea44e..6def41c5d 100644 --- a/core/sys/windows/kernel32.odin +++ b/core/sys/windows/kernel32.odin @@ -1043,7 +1043,7 @@ DUMMYUNIONNAME_u :: struct #raw_union { } SYSTEM_LOGICAL_PROCESSOR_INFORMATION :: struct { - ProcessorMask: ULONGPTR, + ProcessorMask: ULONG_PTR, Relationship: LOGICAL_PROCESSOR_RELATIONSHIP, DummyUnion: DUMMYUNIONNAME_u, }