- Use KeSetBasePriorityThread for changing the thread priority in NtSetInformationThread.

svn path=/trunk/; revision=6078
This commit is contained in:
Hartmut Birr 2003-09-14 10:53:32 +00:00
parent 6f4149e361
commit 9604dab6c5

View file

@ -1,4 +1,4 @@
/* $Id: tinfo.c,v 1.22 2003/09/10 06:12:22 vizzini Exp $ /* $Id: tinfo.c,v 1.23 2003/09/14 10:53:32 hbirr Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -75,14 +75,21 @@ NtSetInformationThread(HANDLE ThreadHandle,
} }
case ThreadBasePriority: case ThreadBasePriority:
if (ThreadInformationLength != sizeof(ULONG)) {
LONG Increment;
if (ThreadInformationLength != sizeof(LONG))
{ {
Status = STATUS_INFO_LENGTH_MISMATCH; Status = STATUS_INFO_LENGTH_MISMATCH;
break; break;
} }
Status = MmCopyFromCaller(&(Thread->Tcb.BasePriority), Status = MmCopyFromCaller(&Increment,
ThreadInformation, ThreadInformation,
sizeof(ULONG)); sizeof(ULONG));
if (NT_SUCCESS(Status))
{
KeSetBasePriorityThread (&Thread->Tcb, Increment);
}
}
break; break;
case ThreadAffinityMask: case ThreadAffinityMask: