diff options
author | dzwdz | 2021-08-18 17:14:22 +0200 |
---|---|---|
committer | dzwdz | 2021-08-18 17:14:22 +0200 |
commit | 5ec560b7a0b5cea60bbda61a48fcc4e9866ce6b1 (patch) | |
tree | 41df495c0b5aa7a4e3cdb70857fa2604952c4213 /src/kernel/proc.h | |
parent | c9d4cf8572f8cbb0024bfa9802c25473f90e9d60 (diff) |
store the processes as a tree instead of a list
I'm about to need that for waits(). There's no single list of processes
for simplicity's sake, but the search will now be even slower and it
might even introduce a potential vuln! How fun! Someone could override
stuff in .bss with random values. I'll either make gcc check if it
hasn't gone past the end of the stack, or turn this into a non recursive
function.
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r-- | src/kernel/proc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h index f5b943a..b2a05c0 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -12,7 +12,8 @@ struct process { struct registers regs; enum process_state state; - struct process *next; + struct process *sibling; + struct process *child; }; extern struct process *process_first; |