diff --git a/service/ptos/head/ps/thread.h b/service/ptos/head/ps/thread.h index ee121a9..70abab0 100644 --- a/service/ptos/head/ps/thread.h +++ b/service/ptos/head/ps/thread.h @@ -22,10 +22,12 @@ struct _PROCESS; * processes. * * @Tid: Thread ID + * @Parent: Parent process * @ThreadLink: Thread queue link */ typedef struct _THREAD { UQUAD Tid; + struct _PROCESS *Parent; TAILQ_ENTRY(_THREAD) ThreadLink; } THREAD; diff --git a/service/ptos/ps/thread.c b/service/ptos/ps/thread.c index 9e30397..1cf3abb 100644 --- a/service/ptos/ps/thread.c +++ b/service/ptos/ps/thread.c @@ -34,6 +34,7 @@ PsCreateThread(struct _PROCESS *Parent, ULONG Flags, THREAD **Result) } Thread->Tid = AtomicIncQuad(&NextThreadTid); + Thread->Parent = Parent; *Result = Thread; return STATUS_SUCCESS; }