Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
55ae0906
Commit
55ae0906
authored
Sep 23, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Oct 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement ThreadGroupInformation class.
Signed-off-by:
Michael Müller
<
michael@fds-team.de
>
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
parent
86b1e74f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
thread.c
dlls/ntdll/thread.c
+50
-0
winternl.h
include/winternl.h
+16
-0
No files found.
dlls/ntdll/thread.c
View file @
55ae0906
...
...
@@ -1103,6 +1103,29 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_END_REQ
;
return
status
;
}
case
ThreadGroupInformation
:
{
const
ULONG_PTR
affinity_mask
=
get_system_affinity_mask
();
GROUP_AFFINITY
affinity
;
memset
(
&
affinity
,
0
,
sizeof
(
affinity
));
affinity
.
Group
=
0
;
/* Wine only supports max 64 processors */
SERVER_START_REQ
(
get_thread_info
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
tid_in
=
0
;
if
(
!
(
status
=
wine_server_call
(
req
)))
affinity
.
Mask
=
reply
->
affinity
&
affinity_mask
;
}
SERVER_END_REQ
;
if
(
status
==
STATUS_SUCCESS
)
{
if
(
data
)
memcpy
(
data
,
&
affinity
,
min
(
length
,
sizeof
(
affinity
)
));
if
(
ret_len
)
*
ret_len
=
min
(
length
,
sizeof
(
affinity
)
);
}
}
return
status
;
case
ThreadPriority
:
case
ThreadBasePriority
:
case
ThreadImpersonationToken
:
...
...
@@ -1233,6 +1256,33 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_END_REQ
;
}
return
status
;
case
ThreadGroupInformation
:
{
const
ULONG_PTR
affinity_mask
=
get_system_affinity_mask
();
const
GROUP_AFFINITY
*
req_aff
;
if
(
length
!=
sizeof
(
*
req_aff
))
return
STATUS_INVALID_PARAMETER
;
if
(
!
data
)
return
STATUS_ACCESS_VIOLATION
;
req_aff
=
data
;
/* On Windows the request fails if the reserved fields are set */
if
(
req_aff
->
Reserved
[
0
]
||
req_aff
->
Reserved
[
1
]
||
req_aff
->
Reserved
[
2
])
return
STATUS_INVALID_PARAMETER
;
/* Wine only supports max 64 processors */
if
(
req_aff
->
Group
)
return
STATUS_INVALID_PARAMETER
;
if
(
req_aff
->
Mask
&
~
affinity_mask
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
req_aff
->
Mask
)
return
STATUS_INVALID_PARAMETER
;
SERVER_START_REQ
(
set_thread_info
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
affinity
=
req_aff
->
Mask
;
req
->
mask
=
SET_THREAD_INFO_AFFINITY
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
return
status
;
case
ThreadBasicInformation
:
case
ThreadTimes
:
case
ThreadPriority
:
...
...
include/winternl.h
View file @
55ae0906
...
...
@@ -859,6 +859,22 @@ typedef enum _THREADINFOCLASS {
ThreadSetTlsArrayAddress
,
ThreadIsIoPending
,
ThreadHideFromDebugger
,
ThreadBreakOnTermination
,
ThreadSwitchLegacyState
,
ThreadIsTerminated
,
ThreadLastSystemCall
,
ThreadIoPriority
,
ThreadCycleTime
,
ThreadPagePriority
,
ThreadActualBasePriority
,
ThreadTebInformation
,
ThreadCSwitchMon
,
ThreadCSwitchPmu
,
ThreadWow64Context
,
ThreadGroupInformation
,
ThreadUmsInformation
,
ThreadCounterProfiling
,
ThreadIdealProcessorEx
,
MaxThreadInfoClass
}
THREADINFOCLASS
;
...
...
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