Implement accessor for the currently executing executive thread
Some checks failed
Builds / ExectOS (amd64, release) (push) Failing after 22s
Builds / ExectOS (i686, release) (push) Failing after 23s
Builds / ExectOS (amd64, debug) (push) Failing after 38s
Builds / ExectOS (i686, debug) (push) Failing after 37s

This commit is contained in:
2026-07-14 23:00:49 +02:00
parent e4ae43f676
commit 68e08d3065
2 changed files with 16 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ namespace PS
STATIC XTAPI XTSTATUS CreateIdleThread(IN PKPROCESSOR_CONTROL_BLOCK Prcb,
IN PVOID Stack);
STATIC XTAPI VOID DeleteThread(IN PVOID ThreadObject);
STATIC XTAPI PETHREAD GetCurrentThread(VOID);
};
}

View File

@@ -78,3 +78,18 @@ PS::Thread::DeleteThread(IN PVOID ThreadObject)
{
UNIMPLEMENTED;
}
/**
* Retrieves a pointer to the currently executing executive thread object.
*
* @return This routine returns the address of the current executive thread object.
*
* @since XT 1.0
*/
XTAPI
PETHREAD
PS::Thread::GetCurrentThread(VOID)
{
/* Retrieve the active kernel thread and cast it to the executive thread */
return (PETHREAD)KE::Processor::GetCurrentThread();
}