mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
- Use KeSetBasePriorityThread for changing the thread priority in NtSetInformationThread.
svn path=/trunk/; revision=6078
This commit is contained in:
parent
6f4149e361
commit
9604dab6c5
1 changed files with 15 additions and 8 deletions
|
@ -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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -75,15 +75,22 @@ NtSetInformationThread(HANDLE ThreadHandle,
|
|||
}
|
||||
|
||||
case ThreadBasePriority:
|
||||
if (ThreadInformationLength != sizeof(ULONG))
|
||||
{
|
||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
LONG Increment;
|
||||
if (ThreadInformationLength != sizeof(LONG))
|
||||
{
|
||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
}
|
||||
Status = MmCopyFromCaller(&Increment,
|
||||
ThreadInformation,
|
||||
sizeof(ULONG));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
KeSetBasePriorityThread (&Thread->Tcb, Increment);
|
||||
}
|
||||
}
|
||||
Status = MmCopyFromCaller(&(Thread->Tcb.BasePriority),
|
||||
ThreadInformation,
|
||||
sizeof(ULONG));
|
||||
break;
|
||||
break;
|
||||
|
||||
case ThreadAffinityMask:
|
||||
Thread->Tcb.UserAffinity = *((PULONG)ThreadInformation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue