summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2021-09-08 19:45:50 +0200
committerdzwdz2021-09-08 19:45:50 +0200
commitf44b80c3f0004418c4953f0a2f32f7bec2e26e36 (patch)
treef5258a5d90316d8ea033eb09bf7220a0271fd808 /src/kernel/proc.h
parent67c847f8660ed73db1017f2ca8b01bfe4eb9ba1b (diff)
process struct: replace the generic saved_addr with an union
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r--src/kernel/proc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index 0efccde..5d9e7eb 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -24,11 +24,13 @@ struct process {
uint32_t id; // only for debugging, don't expose to userland
- // meaning changes depending on the state
- // PS_DEAD - death message
- // PS_WAITS4CHILDDEATH - buffer for said message
- user_ptr saved_addr;
- size_t saved_len;
+ // saved value, meaning depends on .state
+ union {
+ struct { // PS_DEAD, PS_WAITS4CHILDDEATH
+ user_ptr buf;
+ size_t len;
+ } death_msg;
+ };
struct vfs_mount *mount;