From ec732d46274f363c490f4cd6cba05e29182460b5 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Mon, 24 Nov 2025 17:14:28 +0100 Subject: [PATCH] Make SpinLock IRQ_CTX irq_flags volatile --- kernel/spinlock/spinlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/spinlock/spinlock.c b/kernel/spinlock/spinlock.c index 8624003..26ad096 100644 --- a/kernel/spinlock/spinlock.c +++ b/kernel/spinlock/spinlock.c @@ -6,8 +6,8 @@ #define SPINLOCK_HINT() asm volatile("pause") -struct { - uint64_t irq_flags; +static struct { + volatile uint64_t irq_flags; atomic_int irq_nest; } IRQ_CTX = {0};