diff --git a/service/ptos/head/ps/thread.h b/service/ptos/head/ps/thread.h index 7bf1624..8bcd690 100644 --- a/service/ptos/head/ps/thread.h +++ b/service/ptos/head/ps/thread.h @@ -36,6 +36,11 @@ typedef struct _THREAD { TAILQ_ENTRY(_THREAD) ThreadLink; } THREAD; +/* + * Initialize the threading layer + */ +VOID PsThreadInit(VOID); + /* * Exit the current thread * diff --git a/service/ptos/ke/init.c b/service/ptos/ke/init.c index 73d0578..b93e238 100644 --- a/service/ptos/ke/init.c +++ b/service/ptos/ke/init.c @@ -135,6 +135,9 @@ KiKernelInit(VOID) /* Phase 2 init of bootstrap core */ HalKpcrP2Init(&BootstrapCore); + /* Initialize threading */ + PsThreadInit(); + /* Initialize the PBI manager */ ExPbiInit(); diff --git a/service/ptos/ps/thread.c b/service/ptos/ps/thread.c index c9ef638..6136cc8 100644 --- a/service/ptos/ps/thread.c +++ b/service/ptos/ps/thread.c @@ -64,3 +64,9 @@ PsExitThread(ULONG ExitCode) HalCpuSuspend(); } } + +VOID +PsThreadInit(VOID) +{ + SCHED_QUEUE_INIT(&ReaperQueue); +}