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