Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
baa04014
Commit
baa04014
authored
Apr 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement the ProcessAffinityMask case in NtQueryInformationProcess.
parent
ba2bcaf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
process.c
dlls/kernel32/process.c
+8
-14
process.c
dlls/ntdll/process.c
+18
-1
No files found.
dlls/kernel32/process.c
View file @
baa04014
...
@@ -3137,24 +3137,18 @@ BOOL WINAPI SetProcessAffinityMask( HANDLE hProcess, DWORD_PTR affmask )
...
@@ -3137,24 +3137,18 @@ BOOL WINAPI SetProcessAffinityMask( HANDLE hProcess, DWORD_PTR affmask )
/**********************************************************************
/**********************************************************************
* GetProcessAffinityMask (KERNEL32.@)
* GetProcessAffinityMask (KERNEL32.@)
*/
*/
BOOL
WINAPI
GetProcessAffinityMask
(
HANDLE
hProcess
,
BOOL
WINAPI
GetProcessAffinityMask
(
HANDLE
hProcess
,
PDWORD_PTR
process_mask
,
PDWORD_PTR
system_mask
)
PDWORD_PTR
lpProcessAffinityMask
,
PDWORD_PTR
lpSystemAffinityMask
)
{
{
PROCESS_BASIC_INFORMATION
pbi
;
NTSTATUS
status
=
STATUS_SUCCESS
;
NTSTATUS
status
;
status
=
NtQueryInformationProcess
(
hProcess
,
if
(
system_mask
)
*
system_mask
=
(
1
<<
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
)
-
1
;
ProcessBasicInformation
,
if
(
process_mask
)
&
pbi
,
sizeof
(
pbi
),
NULL
);
if
(
status
)
{
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
if
((
status
=
NtQueryInformationProcess
(
hProcess
,
ProcessAffinityMask
,
return
FALSE
;
process_mask
,
sizeof
(
*
process_mask
),
NULL
)))
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
}
}
if
(
lpProcessAffinityMask
)
*
lpProcessAffinityMask
=
pbi
.
AffinityMask
;
return
!
status
;
if
(
lpSystemAffinityMask
)
*
lpSystemAffinityMask
=
(
1
<<
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
)
-
1
;
return
TRUE
;
}
}
...
...
dlls/ntdll/process.c
View file @
baa04014
...
@@ -134,7 +134,6 @@ NTSTATUS WINAPI NtQueryInformationProcess(
...
@@ -134,7 +134,6 @@ NTSTATUS WINAPI NtQueryInformationProcess(
UNIMPLEMENTED_INFO_CLASS
(
ProcessEnableAlignmentFaultFixup
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessEnableAlignmentFaultFixup
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessPriorityClass
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessPriorityClass
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessWx86Information
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessWx86Information
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessAffinityMask
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessPriorityBoost
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessPriorityBoost
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessDeviceMap
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessDeviceMap
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessSessionInformation
);
UNIMPLEMENTED_INFO_CLASS
(
ProcessSessionInformation
);
...
@@ -385,6 +384,24 @@ NTSTATUS WINAPI NtQueryInformationProcess(
...
@@ -385,6 +384,24 @@ NTSTATUS WINAPI NtQueryInformationProcess(
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
}
}
break
;
break
;
case
ProcessAffinityMask
:
len
=
sizeof
(
ULONG_PTR
);
if
(
ProcessInformationLength
==
len
)
{
const
ULONG_PTR
system_mask
=
((
ULONG_PTR
)
1
<<
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
)
-
1
;
SERVER_START_REQ
(
get_process_info
)
{
req
->
handle
=
wine_server_obj_handle
(
ProcessHandle
);
if
(
!
(
ret
=
wine_server_call
(
req
)))
*
(
ULONG_PTR
*
)
ProcessInformation
=
reply
->
affinity
&
system_mask
;
}
SERVER_END_REQ
;
}
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
break
;
case
ProcessWow64Information
:
case
ProcessWow64Information
:
len
=
sizeof
(
DWORD
);
len
=
sizeof
(
DWORD
);
if
(
ProcessInformationLength
==
len
)
if
(
ProcessInformationLength
==
len
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment