ptos: ps: Keep track of parent process
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ PsCreateThread(struct _PROCESS *Parent, ULONG Flags, THREAD **Result)
|
||||
}
|
||||
|
||||
Thread->Tid = AtomicIncQuad(&NextThreadTid);
|
||||
Thread->Parent = Parent;
|
||||
*Result = Thread;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user