Implement KeGetCurrentProcessorNumber() routine
This commit is contained in:
parent
f66e9aea9e
commit
8d6d27651c
@ -21,6 +21,10 @@ XTAPI
|
||||
PKPROCESSOR_CONTROL_BLOCK
|
||||
KeGetCurrentProcessorControlBlock(VOID);
|
||||
|
||||
XTAPI
|
||||
ULONG
|
||||
KeGetCurrentProcessorNumber(VOID);
|
||||
|
||||
XTAPI
|
||||
PKTHREAD
|
||||
KeGetCurrentThread(VOID);
|
||||
|
@ -21,6 +21,10 @@ XTAPI
|
||||
PKPROCESSOR_CONTROL_BLOCK
|
||||
KeGetCurrentProcessorControlBlock(VOID);
|
||||
|
||||
XTAPI
|
||||
ULONG
|
||||
KeGetCurrentProcessorNumber(VOID);
|
||||
|
||||
XTAPI
|
||||
PKTHREAD
|
||||
KeGetCurrentThread(VOID);
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -38,6 +38,20 @@ KeGetCurrentProcessorControlBlock(VOID)
|
||||
return (PKPROCESSOR_CONTROL_BLOCK)ArReadFSDualWord(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)ArReadFSDualWord(FIELD_OFFSET(KPROCESSOR_BLOCK, CpuNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current thread running on the currently executing processor.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user