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
421b3867
Commit
421b3867
authored
Nov 20, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Forward SetThreadIdealProcessor() to ntdll.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
dd30d429
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
9 deletions
+41
-9
thread.c
dlls/kernelbase/thread.c
+7
-7
info.c
dlls/ntdll/tests/info.c
+22
-0
thread.c
dlls/ntdll/unix/thread.c
+11
-2
process.c
dlls/wow64/process.c
+1
-0
No files found.
dlls/kernelbase/thread.c
View file @
421b3867
...
...
@@ -512,13 +512,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadGroupAffinity( HANDLE thread, const GROUP
*/
DWORD
WINAPI
DECLSPEC_HOTPATCH
SetThreadIdealProcessor
(
HANDLE
thread
,
DWORD
proc
)
{
FIXME
(
"(%p %lu): stub
\n
"
,
thread
,
proc
)
;
if
(
proc
>
MAXIMUM_PROCESSORS
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
)
;
return
~
0u
;
}
return
0
;
NTSTATUS
status
;
status
=
NtSetInformationThread
(
thread
,
ThreadIdealProcessor
,
&
proc
,
sizeof
(
proc
)
);
if
(
NT_SUCCESS
(
status
))
return
status
;
SetLastError
(
RtlNtStatusToDosError
(
status
));
return
~
0u
;
}
...
...
dlls/ntdll/tests/info.c
View file @
421b3867
...
...
@@ -3356,6 +3356,27 @@ static void test_thread_lookup(void)
ok
(
!
handle
||
broken
(
handle
==
(
HANDLE
)
0xdeadbeef
)
/* vista */
,
"handle set %p
\n
"
,
handle
);
}
static
void
test_thread_ideal_processor
(
void
)
{
ULONG
number
,
len
;
NTSTATUS
status
;
number
=
0
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadIdealProcessor
,
&
number
,
sizeof
(
number
)
);
ok
(
NT_SUCCESS
(
status
),
"Unexpected status %#lx.
\n
"
,
status
);
number
=
64
+
1
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadIdealProcessor
,
&
number
,
sizeof
(
number
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Unexpected status %#lx.
\n
"
,
status
);
number
=
0
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadIdealProcessor
,
&
number
,
sizeof
(
number
)
);
ok
(
!
status
,
"Unexpected status %#lx.
\n
"
,
status
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
ThreadIdealProcessor
,
&
number
,
sizeof
(
number
),
&
len
);
ok
(
status
==
STATUS_INVALID_INFO_CLASS
,
"Unexpected status %#lx.
\n
"
,
status
);
}
static
void
test_thread_info
(
void
)
{
NTSTATUS
status
;
...
...
@@ -3613,6 +3634,7 @@ START_TEST(info)
test_HideFromDebugger
();
test_thread_start_address
();
test_thread_lookup
();
test_thread_ideal_processor
();
test_affinity
();
test_debug_object
();
...
...
dlls/ntdll/unix/thread.c
View file @
421b3867
...
...
@@ -2177,6 +2177,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
if
(
ret_len
)
*
ret_len
=
sizeof
(
BOOLEAN
);
return
STATUS_SUCCESS
;
case
ThreadIdealProcessor
:
case
ThreadEnableAlignmentFaultFixup
:
return
STATUS_INVALID_INFO_CLASS
;
...
...
@@ -2186,7 +2187,6 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadEventPair_Reusable
:
case
ThreadZeroTlsCell
:
case
ThreadPerformanceCount
:
case
ThreadIdealProcessor
:
case
ThreadPriorityBoost
:
case
ThreadSetTlsArrayAddress
:
default:
...
...
@@ -2379,6 +2379,16 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
FIXME
(
"ThreadPowerThrottling stub!
\n
"
);
return
STATUS_SUCCESS
;
case
ThreadIdealProcessor
:
{
const
ULONG
*
number
=
data
;
if
(
length
!=
sizeof
(
*
number
))
return
STATUS_INFO_LENGTH_MISMATCH
;
if
(
*
number
>
MAXIMUM_PROCESSORS
)
return
STATUS_INVALID_PARAMETER
;
FIXME
(
"ThreadIdealProcessor stub!
\n
"
);
return
STATUS_SUCCESS
;
}
case
ThreadBasicInformation
:
case
ThreadTimes
:
case
ThreadPriority
:
...
...
@@ -2386,7 +2396,6 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadEventPair_Reusable
:
case
ThreadPerformanceCount
:
case
ThreadAmILastThread
:
case
ThreadIdealProcessor
:
case
ThreadPriorityBoost
:
case
ThreadSetTlsArrayAddress
:
case
ThreadIsIoPending
:
...
...
dlls/wow64/process.c
View file @
421b3867
...
...
@@ -1162,6 +1162,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args )
case
ThreadHideFromDebugger
:
/* void */
case
ThreadEnableAlignmentFaultFixup
:
/* BOOLEAN */
case
ThreadPowerThrottlingState
:
/* THREAD_POWER_THROTTLING_STATE */
case
ThreadIdealProcessor
:
/* ULONG */
return
NtSetInformationThread
(
handle
,
class
,
ptr
,
len
);
case
ThreadImpersonationToken
:
/* HANDLE */
...
...
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