KeSetBasePriorityThread function (ntddk.h)

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

Syntax

LONG KeSetBasePriorityThread(
  [in, out] PKTHREAD Thread,
  [in]      LONG     Increment
);

Parameters

[in, out] Thread

Pointer to a dispatcher object of type KTHREAD.

[in] Increment

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

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

KeGetCurrentThread

KeQueryPriorityThread

KeSetPriorityThread