KeSetPriorityThread routine

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

Syntax


KPRIORITY KeSetPriorityThread(
  _Inout_ PKTHREAD  Thread,
  _In_    KPRIORITY Priority
);

Parameters

Thread [in, out]

Pointer to the driver-created thread.

Priority [in]

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

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

PASSIVE_LEVEL

See also

KeGetCurrentThread
KeQueryPriorityThread
KeSetBasePriorityThread

 

 

Send comments about this topic to Microsoft

Show: