mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 09:46:21 +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)
|
LPDWORD lpSystemAffinityMask)
|
||||||
{
|
{
|
||||||
PROCESS_BASIC_INFORMATION ProcessInfo;
|
PROCESS_BASIC_INFORMATION ProcessInfo;
|
||||||
|
SYSTEM_BASIC_INFORMATION SystemInfo;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtQuerySystemInformation(SystemBasicInformation,
|
||||||
|
&SystemInfo,
|
||||||
|
sizeof(SystemInfo),
|
||||||
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus (Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
Status = NtQueryInformationProcess (hProcess,
|
Status = NtQueryInformationProcess (hProcess,
|
||||||
ProcessBasicInformation,
|
ProcessBasicInformation,
|
||||||
|
@ -51,9 +62,7 @@ GetProcessAffinityMask (HANDLE hProcess,
|
||||||
}
|
}
|
||||||
|
|
||||||
*lpProcessAffinityMask = (DWORD)ProcessInfo.AffinityMask;
|
*lpProcessAffinityMask = (DWORD)ProcessInfo.AffinityMask;
|
||||||
|
*lpSystemAffinityMask = (DWORD)SystemInfo.ActiveProcessors;
|
||||||
/* FIXME */
|
|
||||||
*lpSystemAffinityMask = 0x00000001;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue