KeSetPriorityThread 函数 (wdm.h)

KeSetPriorityThread 例程设置驱动程序创建的线程的运行时优先级。

语法

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

参数

[in, out] Thread

指向驱动程序创建的线程的指针。

[in] Priority

指定驱动程序创建的线程的优先级(通常为实时优先级值LOW_REALTIME_PRIORITY)。 保留值LOW_PRIORITY供系统使用。

返回值

KeSetPriorityThread 返回线程的旧优先级。

言论

如果调用 KeSetPriorityThread 将线程的优先级重置为较低的值,则即使线程当前正在运行或即将调度执行,也可以重新计划线程的执行。

要求

要求 价值
最低支持的客户端 从 Windows 2000 开始可用。
目标平台 普遍
标头 wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h)
NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

另请参阅

KeGetCurrentThread

KeQueryPriorityThread

KeSetBasePriorityThread