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
cf6705a8
Commit
cf6705a8
authored
Nov 21, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Forward thread priority boost functions to ntdll.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
9c09288b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
thread.c
dlls/kernelbase/thread.c
+2
-3
thread.c
dlls/ntdll/unix/thread.c
+14
-2
process.c
dlls/wow64/process.c
+2
-0
No files found.
dlls/kernelbase/thread.c
View file @
cf6705a8
...
...
@@ -286,8 +286,7 @@ INT WINAPI DECLSPEC_HOTPATCH GetThreadPriority( HANDLE thread )
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetThreadPriorityBoost
(
HANDLE
thread
,
BOOL
*
state
)
{
if
(
state
)
*
state
=
FALSE
;
return
TRUE
;
return
set_ntstatus
(
NtQueryInformationThread
(
thread
,
ThreadPriorityBoost
,
state
,
sizeof
(
*
state
),
NULL
));
}
...
...
@@ -568,7 +567,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadPriority( HANDLE thread, INT priority )
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SetThreadPriorityBoost
(
HANDLE
thread
,
BOOL
disable
)
{
return
TRUE
;
return
set_ntstatus
(
NtSetInformationThread
(
thread
,
ThreadPriorityBoost
,
&
disable
,
sizeof
(
disable
)
))
;
}
...
...
dlls/ntdll/unix/thread.c
View file @
cf6705a8
...
...
@@ -2177,6 +2177,16 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
if
(
ret_len
)
*
ret_len
=
sizeof
(
BOOLEAN
);
return
STATUS_SUCCESS
;
case
ThreadPriorityBoost
:
{
DWORD
*
value
=
data
;
if
(
length
!=
sizeof
(
ULONG
))
return
STATUS_INFO_LENGTH_MISMATCH
;
if
(
ret_len
)
*
ret_len
=
sizeof
(
ULONG
);
*
value
=
0
;
return
STATUS_SUCCESS
;
}
case
ThreadIdealProcessor
:
case
ThreadEnableAlignmentFaultFixup
:
return
STATUS_INVALID_INFO_CLASS
;
...
...
@@ -2187,7 +2197,6 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadEventPair_Reusable
:
case
ThreadZeroTlsCell
:
case
ThreadPerformanceCount
:
case
ThreadPriorityBoost
:
case
ThreadSetTlsArrayAddress
:
default:
FIXME
(
"info class %d not supported yet
\n
"
,
class
);
...
...
@@ -2389,6 +2398,10 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
return
STATUS_SUCCESS
;
}
case
ThreadPriorityBoost
:
WARN
(
"Unimplemented class ThreadPriorityBoost.
\n
"
);
return
STATUS_SUCCESS
;
case
ThreadBasicInformation
:
case
ThreadTimes
:
case
ThreadPriority
:
...
...
@@ -2396,7 +2409,6 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadEventPair_Reusable
:
case
ThreadPerformanceCount
:
case
ThreadAmILastThread
:
case
ThreadPriorityBoost
:
case
ThreadSetTlsArrayAddress
:
case
ThreadIsIoPending
:
default:
...
...
dlls/wow64/process.c
View file @
cf6705a8
...
...
@@ -899,6 +899,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args )
case
ThreadIsIoPending
:
/* ULONG */
case
ThreadHideFromDebugger
:
/* BOOLEAN */
case
ThreadSuspendCount
:
/* ULONG */
case
ThreadPriorityBoost
:
/* ULONG */
/* FIXME: check buffer alignment */
return
NtQueryInformationThread
(
handle
,
class
,
ptr
,
len
,
retlen
);
...
...
@@ -1163,6 +1164,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args )
case
ThreadEnableAlignmentFaultFixup
:
/* BOOLEAN */
case
ThreadPowerThrottlingState
:
/* THREAD_POWER_THROTTLING_STATE */
case
ThreadIdealProcessor
:
/* ULONG */
case
ThreadPriorityBoost
:
/* 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