Lifecycle management of threads #29

Merged
harraiken merged 240 commits from threads into master 2026-09-07 13:45:09 +02:00
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 68e08d3065 - Show all commits

View File

@@ -21,6 +21,7 @@ namespace PS
STATIC XTAPI XTSTATUS CreateIdleThread(IN PKPROCESSOR_CONTROL_BLOCK Prcb, STATIC XTAPI XTSTATUS CreateIdleThread(IN PKPROCESSOR_CONTROL_BLOCK Prcb,
IN PVOID Stack); IN PVOID Stack);
STATIC XTAPI VOID DeleteThread(IN PVOID ThreadObject); 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; 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();
}