Expose system process object
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after 30s
Builds / ExectOS (amd64, release) (push) Failing after 31s
Builds / ExectOS (i686, debug) (push) Failing after 30s
Builds / ExectOS (i686, release) (push) Failing after 33s

This commit is contained in:
2026-07-09 08:54:22 +02:00
parent 34acfe2b8b
commit 7db52a816f
3 changed files with 22 additions and 0 deletions

View File

@@ -17,9 +17,13 @@ namespace PS
{
class Process
{
private:
STATIC PEPROCESS SystemProcess;
public:
STATIC XTAPI XTSTATUS CreateIdleProcess(IN PKPROCESSOR_CONTROL_BLOCK Prcb);
STATIC XTFASTCALL PEPROCESS GetCurrentProcess(VOID);
STATIC XTFASTCALL PEPROCESS GetSystemProcess(VOID);
};
}

View File

@@ -9,5 +9,8 @@
#include <xtos.hh>
/* Pointer to the system process object */
PEPROCESS PS::Process::SystemProcess;
/* Default system-wide quota block assigned to processes */
EPROCESS_QUOTA_BLOCK PS::Quota::DefaultQuotaBlock;

View File

@@ -64,3 +64,18 @@ PS::Process::GetCurrentProcess(VOID)
/* Return the current process */
return (PEPROCESS)KE::Processor::GetCurrentThread()->ApcState.Process;
}
/**
* Returns a pointer to the primary system process object.
*
* @return This routine returns a pointer to the system process object.
*
* @since XT 1.0
*/
XTFASTCALL
PEPROCESS
PS::Process::GetSystemProcess(VOID)
{
/* Return the system process */
return SystemProcess;
}