GetProcessAffinityMask() should return correct system affinity mask
Modified: trunk/reactos/lib/kernel32/process/proc.c
_____
Modified: trunk/reactos/lib/kernel32/process/proc.c
--- trunk/reactos/lib/kernel32/process/proc.c 2005-01-07 13:06:11 UTC
(rev 12866)
+++ trunk/reactos/lib/kernel32/process/proc.c 2005-01-07 13:34:47 UTC
(rev 12867)
@@ -37,7 +37,18 @@
LPDWORD lpSystemAffinityMask)
{
PROCESS_BASIC_INFORMATION ProcessInfo;
+ SYSTEM_BASIC_INFORMATION SystemInfo;
NTSTATUS Status;
+
+ Status = NtQuerySystemInformation(SystemBasicInformation,
+ &SystemInfo,
+ sizeof(SystemInfo),
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus (Status);
+ return FALSE;
+ }
Status = NtQueryInformationProcess (hProcess,
ProcessBasicInformation,
@@ -51,10 +62,8 @@
}
*lpProcessAffinityMask = (DWORD)ProcessInfo.AffinityMask;
+ *lpSystemAffinityMask = (DWORD)SystemInfo.ActiveProcessors;
- /* FIXME */
- *lpSystemAffinityMask = 0x00000001;
-
return TRUE;
}
Show replies by date