Commit cf6705a8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

kernelbase: Forward thread priority boost functions to ntdll.

parent 9c09288b
...@@ -286,8 +286,7 @@ INT WINAPI DECLSPEC_HOTPATCH GetThreadPriority( HANDLE thread ) ...@@ -286,8 +286,7 @@ INT WINAPI DECLSPEC_HOTPATCH GetThreadPriority( HANDLE thread )
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH GetThreadPriorityBoost( HANDLE thread, BOOL *state ) BOOL WINAPI DECLSPEC_HOTPATCH GetThreadPriorityBoost( HANDLE thread, BOOL *state )
{ {
if (state) *state = FALSE; return set_ntstatus( NtQueryInformationThread( thread, ThreadPriorityBoost, state, sizeof(*state), NULL ));
return TRUE;
} }
...@@ -568,7 +567,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadPriority( HANDLE thread, INT priority ) ...@@ -568,7 +567,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadPriority( HANDLE thread, INT priority )
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH SetThreadPriorityBoost( HANDLE thread, BOOL disable ) BOOL WINAPI DECLSPEC_HOTPATCH SetThreadPriorityBoost( HANDLE thread, BOOL disable )
{ {
return TRUE; return set_ntstatus( NtSetInformationThread( thread, ThreadPriorityBoost, &disable, sizeof(disable) ));
} }
......
...@@ -2177,6 +2177,16 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -2177,6 +2177,16 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
if (ret_len) *ret_len = sizeof(BOOLEAN); if (ret_len) *ret_len = sizeof(BOOLEAN);
return STATUS_SUCCESS; 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 ThreadIdealProcessor:
case ThreadEnableAlignmentFaultFixup: case ThreadEnableAlignmentFaultFixup:
return STATUS_INVALID_INFO_CLASS; return STATUS_INVALID_INFO_CLASS;
...@@ -2187,7 +2197,6 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -2187,7 +2197,6 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadEventPair_Reusable: case ThreadEventPair_Reusable:
case ThreadZeroTlsCell: case ThreadZeroTlsCell:
case ThreadPerformanceCount: case ThreadPerformanceCount:
case ThreadPriorityBoost:
case ThreadSetTlsArrayAddress: case ThreadSetTlsArrayAddress:
default: default:
FIXME( "info class %d not supported yet\n", class ); FIXME( "info class %d not supported yet\n", class );
...@@ -2389,6 +2398,10 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -2389,6 +2398,10 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
case ThreadPriorityBoost:
WARN("Unimplemented class ThreadPriorityBoost.\n");
return STATUS_SUCCESS;
case ThreadBasicInformation: case ThreadBasicInformation:
case ThreadTimes: case ThreadTimes:
case ThreadPriority: case ThreadPriority:
...@@ -2396,7 +2409,6 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -2396,7 +2409,6 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadEventPair_Reusable: case ThreadEventPair_Reusable:
case ThreadPerformanceCount: case ThreadPerformanceCount:
case ThreadAmILastThread: case ThreadAmILastThread:
case ThreadPriorityBoost:
case ThreadSetTlsArrayAddress: case ThreadSetTlsArrayAddress:
case ThreadIsIoPending: case ThreadIsIoPending:
default: default:
......
...@@ -899,6 +899,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args ) ...@@ -899,6 +899,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args )
case ThreadIsIoPending: /* ULONG */ case ThreadIsIoPending: /* ULONG */
case ThreadHideFromDebugger: /* BOOLEAN */ case ThreadHideFromDebugger: /* BOOLEAN */
case ThreadSuspendCount: /* ULONG */ case ThreadSuspendCount: /* ULONG */
case ThreadPriorityBoost: /* ULONG */
/* FIXME: check buffer alignment */ /* FIXME: check buffer alignment */
return NtQueryInformationThread( handle, class, ptr, len, retlen ); return NtQueryInformationThread( handle, class, ptr, len, retlen );
...@@ -1163,6 +1164,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args ) ...@@ -1163,6 +1164,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args )
case ThreadEnableAlignmentFaultFixup: /* BOOLEAN */ case ThreadEnableAlignmentFaultFixup: /* BOOLEAN */
case ThreadPowerThrottlingState: /* THREAD_POWER_THROTTLING_STATE */ case ThreadPowerThrottlingState: /* THREAD_POWER_THROTTLING_STATE */
case ThreadIdealProcessor: /* ULONG */ case ThreadIdealProcessor: /* ULONG */
case ThreadPriorityBoost: /* ULONG */
return NtSetInformationThread( handle, class, ptr, len ); return NtSetInformationThread( handle, class, ptr, len );
case ThreadImpersonationToken: /* HANDLE */ case ThreadImpersonationToken: /* HANDLE */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment