展開 最小化

KeGetProcessorIndexFromNumber routine

The KeGetProcessorIndexFromNumber routine converts a group number and a group-relative processor number to a systemwide processor index.

Syntax


ULONG KeGetProcessorIndexFromNumber(
  _In_  PPROCESSOR_NUMBER ProcNumber
);

Parameters

ProcNumber [in]

A pointer to a caller-allocated PROCESSOR_NUMBER structure that contains a group number and a group-relative processor number.

Return value

KeGetProcessorIndexFromNumber returns a systemwide processor index if the call is successful. If ProcNumber points to an invalid PROCESSOR_NUMBER value, the routine returns INVALID_PROCESSOR_INDEX, which is defined in the Wdm.h header file.

Remarks

This routine accepts as input a PROCESSOR_NUMBER structure that identifies a processor by its group number and its processor number within the group. The return value is a processor index that identifies the processor across the entire multiprocessor system.

For example, if a multiprocessor system contains two groups, and each group contains 64 logical processors, the processor numbers in each group range from 0 to 63, but the systemwide processor indexes range from 0 to 127.

To obtain the total number of active logical processors in the system, call the KeQueryActiveProcessorCountEx routine and set this routine's GroupNumber parameter to ALL_PROCESSOR_GROUPS.

The KeGetProcessorNumberFromIndex routine converts a systemwide processor index to a group number and a group-relative processor number.

Requirements

Version

Available in Windows 7 and later versions of Windows.

Header

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

Library

Ntoskrnl.lib

IRQL

Any level

See also

KeGetProcessorNumberFromIndex
KeQueryActiveProcessorCountEx
PROCESSOR_NUMBER

 

 

Send comments about this topic to Microsoft

表示:
© 2014 Microsoft