diff options
author | Ian Moffett <ian@osmora.org> | 2025-05-28 22:35:28 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-05-28 22:37:41 -0400 |
commit | 415fb9894a4cbd761791ef1e218a5b01089cf80d (patch) | |
tree | 2203b7ba6b986aa86987af5a1a27a100f70fb77f /sys/include | |
parent | 3dc995e1eb82022453da9ed9d3b639b989e485cf (diff) |
kernel: exit: Handle killings of kernel threads
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/proc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h index 1b59de9..7b03672 100644 --- a/sys/include/sys/proc.h +++ b/sys/include/sys/proc.h @@ -84,6 +84,11 @@ struct proc { #define PROC_LEAFQ BIT(3) /* Leaf queue is active */ #define PROC_WAITED BIT(4) /* Being waited on by parent */ +/* + * Flags for exit1() + */ +#define EXIT_KTD BIT(0) /* Kill a kernel thread */ + struct proc *this_td(void); struct proc *get_child(struct proc *cur, pid_t pid); int md_spawn(struct proc *p, struct proc *parent, uintptr_t ip); @@ -95,7 +100,7 @@ void md_td_stackinit(struct proc *td, void *stack_top, struct exec_prog *prog); __dead void md_td_kick(struct proc *td); int fork1(struct proc *cur, int flags, void(*ip)(void), struct proc **newprocp); -int exit1(struct proc *td); +int exit1(struct proc *td, int flags); __dead scret_t sys_exit(struct syscall_args *scargs); #endif /* _KERNEL */ |