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
329ab989
Commit
329ab989
authored
Jan 11, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented ntdll.NtSetInformationThread(ThreadAffinityMask).
Reimplemented kernel32.SetThreadAffinityMask on top of it.
parent
1ca3a4af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
thread.c
dlls/kernel/thread.c
+17
-9
thread.c
dlls/ntdll/thread.c
+14
-1
No files found.
dlls/kernel/thread.c
View file @
329ab989
...
@@ -443,17 +443,25 @@ BOOL WINAPI SetThreadPriorityBoost(
...
@@ -443,17 +443,25 @@ BOOL WINAPI SetThreadPriorityBoost(
*/
*/
DWORD
WINAPI
SetThreadAffinityMask
(
HANDLE
hThread
,
DWORD
dwThreadAffinityMask
)
DWORD
WINAPI
SetThreadAffinityMask
(
HANDLE
hThread
,
DWORD
dwThreadAffinityMask
)
{
{
DWORD
ret
;
NTSTATUS
status
;
SERVER_START_REQ
(
set_thread_info
)
THREAD_BASIC_INFORMATION
tbi
;
status
=
NtQueryInformationThread
(
hThread
,
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
);
if
(
status
)
{
{
req
->
handle
=
hThread
;
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
req
->
affinity
=
dwThreadAffinityMask
;
return
0
;
req
->
mask
=
SET_THREAD_INFO_AFFINITY
;
ret
=
!
wine_server_call_err
(
req
);
/* FIXME: should return previous value */
}
}
SERVER_END_REQ
;
status
=
NtSetInformationThread
(
hThread
,
ThreadAffinityMask
,
return
ret
;
&
dwThreadAffinityMask
,
sizeof
(
dwThreadAffinityMask
));
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
0
;
}
return
tbi
.
AffinityMask
;
}
}
...
...
dlls/ntdll/thread.c
View file @
329ab989
...
@@ -982,10 +982,23 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
...
@@ -982,10 +982,23 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
return
status
;
return
status
;
case
ThreadAffinityMask
:
{
const
DWORD
*
paff
=
data
;
if
(
length
!=
sizeof
(
DWORD
))
return
STATUS_INVALID_PARAMETER
;
SERVER_START_REQ
(
set_thread_info
)
{
req
->
handle
=
handle
;
req
->
affinity
=
*
paff
;
req
->
mask
=
SET_THREAD_INFO_AFFINITY
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
return
status
;
case
ThreadBasicInformation
:
case
ThreadBasicInformation
:
case
ThreadTimes
:
case
ThreadTimes
:
case
ThreadPriority
:
case
ThreadPriority
:
case
ThreadAffinityMask
:
case
ThreadDescriptorTableEntry
:
case
ThreadDescriptorTableEntry
:
case
ThreadEnableAlignmentFaultFixup
:
case
ThreadEnableAlignmentFaultFixup
:
case
ThreadEventPair_Reusable
:
case
ThreadEventPair_Reusable
:
...
...
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