summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-09 16:03:57 -0400
committerIan Moffett <ian@osmora.org>2025-06-09 16:05:34 -0400
commitb0025dc0cda5acf6a4b061a3b31f32798c664e5f (patch)
treeede7fb5d76784706913d77227206d9ebf8fa970c /sys
parentcb195d202cf71e8bea71749600423190107a3621 (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>
Diffstat (limited to 'sys')
-rw-r--r--sys/include/sys/proc.h2
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;