Expand Minimize

KeSetBasePriorityThread routine

The KeSetBasePriorityThread routine sets the run-time priority, relative to the current process, for a given thread.

Syntax


LONG KeSetBasePriorityThread(
  _Inout_  PKTHREAD Thread,
  _In_     LONG Increment
);

Parameters

Thread [in, out]

Pointer to a dispatcher object of type KTHREAD.

Increment [in]

Specifies the value to be added to the base priority of the process for the Thread.

Return value

KeSetBasePriorityThread returns the previous base priority increment of the given thread. The previous base priority increment is defined as the difference between the specified thread's old base priority and the base priority of the thread's process.

Remarks

The new base priority is computed by adding the given Increment, which can be a negative value, to the base priority of the specified thread's process. The resultant value is stored as the base priority of the specified thread.

Drivers that set up device-dedicated threads with variable priority attributes can call this routine to set such a thread's priority relative to the system process in which the thread is created.

The new base priority is restricted to the priority class of the given thread's process. Therefore, the base priority is not allowed to cross over from a variable priority class to a real-time priority class or vice versa.

Requirements

Version

Available starting with Windows 2000.

Header

Ntddk.h (include Ntddk.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

KeGetCurrentThread
KeQueryPriorityThread
KeSetPriorityThread

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft