Skip to content

Commit de3726c

Browse files
committed
Add GetActiveProcessorCount and process attributes
1 parent eb19bd3 commit de3726c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: library/std/src/sys/windows/c/windows_sys.lst

+2
Original file line numberDiff line numberDiff line change
@@ -2480,6 +2480,7 @@ Windows.Win32.System.SystemInformation.GetSystemTimeAsFileTime
24802480
Windows.Win32.System.SystemInformation.GetWindowsDirectoryW
24812481
Windows.Win32.System.SystemInformation.PROCESSOR_ARCHITECTURE
24822482
Windows.Win32.System.SystemInformation.SYSTEM_INFO
2483+
Windows.Win32.System.SystemServices.ALL_PROCESSOR_GROUPS
24832484
Windows.Win32.System.SystemServices.DLL_PROCESS_DETACH
24842485
Windows.Win32.System.SystemServices.DLL_THREAD_DETACH
24852486
Windows.Win32.System.SystemServices.EXCEPTION_MAXIMUM_PARAMETERS
@@ -2512,6 +2513,7 @@ Windows.Win32.System.Threading.DeleteProcThreadAttributeList
25122513
Windows.Win32.System.Threading.DETACHED_PROCESS
25132514
Windows.Win32.System.Threading.ExitProcess
25142515
Windows.Win32.System.Threading.EXTENDED_STARTUPINFO_PRESENT
2516+
Windows.Win32.System.Threading.GetActiveProcessorCount
25152517
Windows.Win32.System.Threading.GetCurrentProcess
25162518
Windows.Win32.System.Threading.GetCurrentProcessId
25172519
Windows.Win32.System.Threading.GetCurrentThread

Diff for: library/std/src/sys/windows/c/windows_sys.rs

+5
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ extern "system" {
220220
pub fn FreeEnvironmentStringsW(penv: PCWSTR) -> BOOL;
221221
}
222222
#[link(name = "kernel32")]
223+
extern "system" {
224+
pub fn GetActiveProcessorCount(groupnumber: u16) -> u32;
225+
}
226+
#[link(name = "kernel32")]
223227
extern "system" {
224228
pub fn GetCommandLineW() -> PCWSTR;
225229
}
@@ -844,6 +848,7 @@ impl ::core::clone::Clone for ADDRINFOA {
844848
pub const AF_INET: ADDRESS_FAMILY = 2u16;
845849
pub const AF_INET6: ADDRESS_FAMILY = 23u16;
846850
pub const AF_UNSPEC: ADDRESS_FAMILY = 0u16;
851+
pub const ALL_PROCESSOR_GROUPS: u32 = 65535u32;
847852
#[repr(C)]
848853
pub union ARM64_NT_NEON128 {
849854
pub Anonymous: ARM64_NT_NEON128_0,

0 commit comments

Comments
 (0)