Implement KeGetCurrentProcessorNumber() routine

This commit is contained in:
2024-05-07 18:52:43 +02:00
parent f66e9aea9e
commit 8d6d27651c
4 changed files with 36 additions and 0 deletions

View File

@@ -38,6 +38,20 @@ KeGetCurrentProcessorControlBlock(VOID)
return (PKPROCESSOR_CONTROL_BLOCK)ArReadGSQuadWord(FIELD_OFFSET(KPROCESSOR_BLOCK, CurrentPrcb));
}
/**
* Gets the number of the currently executing processor.
*
* @return This routine returns the zero-indexed processor number.
*
* @since XT 1.0
*/
XTAPI
ULONG
KeGetCurrentProcessorNumber(VOID)
{
return (ULONG)ArReadGSQuadWord(FIELD_OFFSET(KPROCESSOR_BLOCK, CpuNumber));
}
/**
* Gets the current thread running on the currently executing processor.
*