Allow to postpone thread startup

This commit is contained in:
2023-11-11 16:30:53 +01:00
parent 67496bef28
commit 1d9a79736a
4 changed files with 27 additions and 11 deletions

View File

@@ -49,7 +49,8 @@ KeInitializeThread(IN PKPROCESS Process,
IN PVOID StartContext,
IN PCONTEXT Context,
IN PVOID EnvironmentBlock,
IN PVOID Stack)
IN PVOID Stack,
IN BOOLEAN StartThread)
{
PKWAIT_BLOCK TimerWaitBlock;
BOOLEAN Allocation;
@@ -164,7 +165,13 @@ KeInitializeThread(IN PKPROCESS Process,
/* Mark thread as initialized and run it */
Thread->State = Initialized;
KeStartThread(Thread);
/* Check if thread should be started */
if(StartThread)
{
/* Start thread */
KeStartThread(Thread);
}
/* Return success */
return STATUS_SUCCESS;