Hardware Dev Center

NdisSystemProcessorCount function

The NdisSystemProcessorCount function determines whether the caller is running on a uniprocessor or multiprocessor computer.

Syntax


CCHAR NdisSystemProcessorCount(void);

Parameters

This function has no parameters.

Return value

NdisSystemProcessorCount returns the number of processors in the computer.

Remarks

An NDIS driver can call the NdisSystemProcessorCount function to retrieve the maximum number of processors in the local computer. To retrieve the number of currently active processors, the driver must call the NdisSystemActiveProcessorCount function.

NdisSystemProcessorCount is similar to the KeQueryMaximumProcessorCount function.

The value that NdisSystemProcessorCount returns does not change at runtime.

If your code uses an array of buffers, one buffer for each processor, you must decide whether to have a statically sized array based on NdisSystemProcessorCount or a dynamically sized array based on NdisSystemActiveProcessorCount.

To optimize your code based on the number of processors, you must use a resizable structure. In this case, use NdisSystemActiveProcessorCount.

If you are not optimizing and if the data structures that result from using the maximum processor count are relatively small, a resizable structure is not necessary. In this case, use NdisSystemProcessorCount to determine the size for a static array.

Requirements

Target platform

Universal

Version

Supported in NDIS 6.0 and 6.1. For NDIS 6.20 and later, use NdisGroupMaxProcessorCount.

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

DDI compliance rules

Irql_Miscellaneous_Function

See also

DriverEntry of NDIS Protocol Drivers
KeQueryMaximumProcessorCount
NdisGroupMaxProcessorCount
NdisSystemActiveProcessorCount

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft