KeSetPriorityThread function (wdm.h)

The KeSetPriorityThread routine sets the run-time priority of a driver-created thread.

Syntax

KPRIORITY KeSetPriorityThread(
  [in, out] PKTHREAD  Thread,
  [in]      KPRIORITY Priority
);

Parameters

[in, out] Thread

Pointer to the driver-created thread.

[in] Priority

Specifies the priority of the driver-created thread, usually to the real-time priority value, LOW_REALTIME_PRIORITY. The value LOW_PRIORITY is reserved for system use.

Return value

KeSetPriorityThread returns the old priority of the thread.

Remarks

If a call to KeSetPriorityThread resets the thread's priority to a lower value, execution of the thread can be rescheduled even if it is currently running or is about to be dispatched for execution.

Requirements

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

See also

KeGetCurrentThread

KeQueryPriorityThread

KeSetBasePriorityThread