diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-09 16:03:57 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-09 16:05:34 -0400 |
commit | b0025dc0cda5acf6a4b061a3b31f32798c664e5f (patch) | |
tree | ede7fb5d76784706913d77227206d9ebf8fa970c | |
parent | cb195d202cf71e8bea71749600423190107a3621 (diff) |
kernel: proc: Make per-process flags volatile
The per process flags field is a frequently modified/read field and MUST
NOT give stale data. Be very sure that the compiler does not optimize
away accesses.
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/include/sys/proc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h index 25f5fd3..2f1470a 100644 --- a/sys/include/sys/proc.h +++ b/sys/include/sys/proc.h @@ -68,7 +68,7 @@ struct proc { size_t priority; int exit_status; bool rested; - uint32_t flags; + volatile uint32_t flags; uint32_t nleaves; uintptr_t stack_base; struct spinlock ksigq_lock; |