Commit 60cae6e2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Implemented kernel32:SetThreadPriority on top of ntdll's equivalent

functions.
parent 856221c0
......@@ -416,16 +416,19 @@ BOOL WINAPI SetThreadPriority(
HANDLE hthread, /* [in] Handle to thread */
INT priority) /* [in] Thread priority level */
{
BOOL ret;
SERVER_START_REQ( set_thread_info )
DWORD prio = priority;
NTSTATUS status;
status = NtSetInformationThread(hthread, ThreadBasePriority,
&prio, sizeof(prio));
if (status)
{
req->handle = hthread;
req->priority = priority;
req->mask = SET_THREAD_INFO_PRIORITY;
ret = !wine_server_call_err( req );
SetLastError( RtlNtStatusToDosError(status) );
return FALSE;
}
SERVER_END_REQ;
return ret;
return TRUE;
}
......
......@@ -634,12 +634,25 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
status = wine_server_call( req );
}
SERVER_END_REQ;
return status;
}
return status;
case ThreadBasePriority:
{
const DWORD *pprio = data;
if (length != sizeof(DWORD)) return STATUS_INVALID_PARAMETER;
SERVER_START_REQ( set_thread_info )
{
req->handle = handle;
req->priority = *pprio;
req->mask = SET_THREAD_INFO_PRIORITY;
status = wine_server_call( req );
}
SERVER_END_REQ;
}
return status;
case ThreadBasicInformation:
case ThreadTimes:
case ThreadPriority:
case ThreadBasePriority:
case ThreadAffinityMask:
case ThreadDescriptorTableEntry:
case ThreadEnableAlignmentFaultFixup:
......
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