mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
GetProcessAffinityMask() should return correct system affinity mask
svn path=/trunk/; revision=12867
This commit is contained in:
parent
2637be230f
commit
8a3239aef3
1 changed files with 12 additions and 3 deletions
|
@ -37,7 +37,18 @@ GetProcessAffinityMask (HANDLE hProcess,
|
|||
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,9 +62,7 @@ GetProcessAffinityMask (HANDLE hProcess,
|
|||
}
|
||||
|
||||
*lpProcessAffinityMask = (DWORD)ProcessInfo.AffinityMask;
|
||||
|
||||
/* FIXME */
|
||||
*lpSystemAffinityMask = 0x00000001;
|
||||
*lpSystemAffinityMask = (DWORD)SystemInfo.ActiveProcessors;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue