GetNumaNodeProcessorMaskEx function

Retrieves the processor mask for a node regardless of the processor group the node belongs to.

Syntax

BOOL GetNumaNodeProcessorMaskEx(
  USHORT          Node,
  PGROUP_AFFINITY ProcessorMask
);

Parameters

Node

The node number.

ProcessorMask

A pointer to a GROUP_AFFINITY structure that receives the processor mask for the specified node. A processor mask is a bit vector in which each bit represents a processor and whether it is in the node.

If the specified node has no processors configured, the Mask member is zero and the Group member is undefined.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The GetNumaNodeProcessorMaskEx function differs from GetNumaNodeProcessorMask in that it can retrieve the processor mask for a node regardless of the group the node belongs to. That is, the node does not have to be in the same group as the calling thread. The GetNumaNodeProcessorMask function can retrieve the processor mask only for nodes that are in the same group as the calling thread.

To retrieve the highest numbered node in the system, use the GetNumaHighestNodeNumber function. Note that this number is not guaranteed to equal the total number of nodes in the system.

To ensure that all threads for your process run on the same node, use the SetProcessAffinityMask function with a process affinity mask that specifies processors in the same node.

To compile an application that uses this function, set _WIN32_WINNT >= 0x0601. For more information, see Using the Windows Headers.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header systemtopologyapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

GROUP_AFFINITY

GetNumaNodeProcessorMask

NUMA Support

Processor Groups