NdisSystemActiveProcessorCount 函数 (ndis.h)
NdisSystemActiveProcessorCount 函数返回本地计算机中当前处于活动状态的处理器数。
语法
ULONG NdisSystemActiveProcessorCount(
PKAFFINITY ActiveProcessors
);
参数
ActiveProcessors
指向 KAFFINITY类型变量的指针,该变量接收表示当前活动处理器集的位图。 在热添加环境中,此位图可以在运行时更改。
返回值
NdisSystemActiveProcessorCount 返回本地计算机中当前处于活动状态的处理器数。
言论
在初始化期间,NDIS 驱动程序可能会在初始化期间调用 NdisSystemActiveProcessorCount 函数,然后再分配资源。
NdisSystemActiveProcessorCount 类似于 KeQueryActiveProcessorCount 函数。
注意, NDIS 驱动程序不应使用 NdisSystemProcessorCount 来检索当前活动处理器的数量,
注释NdisSystemActiveProcessorCount 可能不会将处理器映射到返回的 [**KAFFINITY**](/windows-hardware/drivers/kernel/interrupt-affinity-and-priority#about-kaffinity) 值中的位。
NdisSystemActiveProcessorCount 每次调用它时可能不会返回相同的位图。
Windows Server 2008 企业版作系统和 Windows Server 2008 Datacenter作系统支持 动态硬件分区。 作为动态硬件分区的一部分,Windows Server 2008 在运行时支持 CPU 的热添加作。 在热添加 CPU 环境中,在运行时,处理器数可能不会保持不变。
要求
要求 | 价值 |
---|---|
最低支持的客户端 | NDIS 6.1 支持。 对于 NDIS 6.20 及更高版本,请改用 NdisGroupActiveProcessorCount。 |
目标平台 | 普遍 |
标头 | ndis.h (包括 Ndis.h) |
库 | Ndis.lib |
IRQL | 任何级别 |