Expose system process object
This commit is contained in:
@@ -17,9 +17,13 @@ namespace PS
|
|||||||
{
|
{
|
||||||
class Process
|
class Process
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
STATIC PEPROCESS SystemProcess;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
STATIC XTAPI XTSTATUS CreateIdleProcess(IN PKPROCESSOR_CONTROL_BLOCK Prcb);
|
STATIC XTAPI XTSTATUS CreateIdleProcess(IN PKPROCESSOR_CONTROL_BLOCK Prcb);
|
||||||
STATIC XTFASTCALL PEPROCESS GetCurrentProcess(VOID);
|
STATIC XTFASTCALL PEPROCESS GetCurrentProcess(VOID);
|
||||||
|
STATIC XTFASTCALL PEPROCESS GetSystemProcess(VOID);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,8 @@
|
|||||||
#include <xtos.hh>
|
#include <xtos.hh>
|
||||||
|
|
||||||
|
|
||||||
|
/* Pointer to the system process object */
|
||||||
|
PEPROCESS PS::Process::SystemProcess;
|
||||||
|
|
||||||
/* Default system-wide quota block assigned to processes */
|
/* Default system-wide quota block assigned to processes */
|
||||||
EPROCESS_QUOTA_BLOCK PS::Quota::DefaultQuotaBlock;
|
EPROCESS_QUOTA_BLOCK PS::Quota::DefaultQuotaBlock;
|
||||||
|
|||||||
@@ -64,3 +64,18 @@ PS::Process::GetCurrentProcess(VOID)
|
|||||||
/* Return the current process */
|
/* Return the current process */
|
||||||
return (PEPROCESS)KE::Processor::GetCurrentThread()->ApcState.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;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user