Add helper to get currently executing process
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 35s
Builds / ExectOS (i686, debug) (push) Successful in 41s
Builds / ExectOS (i686, release) (push) Successful in 34s
Builds / ExectOS (amd64, debug) (push) Successful in 43s

This commit is contained in:
2026-06-18 20:34:28 +02:00
parent 9faf19b57e
commit 95ec18a1de
2 changed files with 16 additions and 0 deletions

View File

@@ -49,3 +49,18 @@ PS::Process::CreateIdleProcess(IN PKPROCESSOR_CONTROL_BLOCK Prcb)
/* Initialize IDLE thread */
return KE::KThread::InitializeIdleThread(IdleProcess, IdleThread, Prcb, AR::ProcessorSupport::GetBootStack());
}
/**
* Returns a pointer to the process object associated with the currently executing thread.
*
* @return This routine returns a pointer to the current process object.
*
* @since XT 1.0
*/
XTFASTCALL
PEPROCESS
PS::Process::GetCurrentProcess(VOID)
{
/* Return the current process */
return (PEPROCESS)KE::Processor::GetCurrentThread()->ApcState.Process;
}