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 )
*/
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) ));
}
......
......@@ -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:
......
......@@ -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 */
......
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