Let KeGetCurrentProcessorControlBlock() use CurrentPrcb field and correct comments
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 31s
Builds / ExectOS (i686) (push) Successful in 28s

This commit is contained in:
Rafal Kupiec 2023-11-13 15:36:50 +01:00
parent 1d9a79736a
commit fc85e0674b
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 11 additions and 4 deletions

View File

@ -39,11 +39,11 @@ KeGetCurrentProcessorControlBlock(VOID)
}
/**
* Gets address of current kernel's thread object.
* Gets the current thread running on the currently executing processor.
*
* @return This routine returns address of current kernel's thread object.
* @return This routine returns the address of the current thread object.
*
* @since XT 1.0
* @since NT 3.5
*/
XTAPI
PKTHREAD

View File

@ -35,9 +35,16 @@ XTAPI
PKPROCESSOR_CONTROL_BLOCK
KeGetCurrentProcessorControlBlock(VOID)
{
return (PKPROCESSOR_CONTROL_BLOCK)ArReadFSDualWord(FIELD_OFFSET(KPROCESSOR_BLOCK, Prcb));
return (PKPROCESSOR_CONTROL_BLOCK)ArReadFSDualWord(FIELD_OFFSET(KPROCESSOR_BLOCK, CurrentPrcb));
}
/**
* Gets the current thread running on the currently executing processor.
*
* @return This routine returns the address of the current thread object.
*
* @since NT 3.5
*/
XTAPI
PKTHREAD
KeGetCurrentThread(VOID)