From b1730c99f882fc2662c6b64371a4b11a8231bb9f Mon Sep 17 00:00:00 2001 From: Agustina Arzille Date: Mon, 3 Apr 2017 16:09:51 +0200 Subject: Use the new atomic operations interface Stick to a sequentially consistent model for most atomic operations as it matches the semantics of the existing code. Each call site will have to be reevaluated in order to switch to more relaxed accesses where possible. --- kern/panic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/panic.c') diff --git a/kern/panic.c b/kern/panic.c index e0bf30cc..a9599f26 100644 --- a/kern/panic.c +++ b/kern/panic.c @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include #include @@ -31,7 +31,7 @@ panic(const char *format, ...) va_list list; unsigned long already_done; - already_done = atomic_swap_uint(&panic_done, 1); + already_done = atomic_swap_seq_cst(&panic_done, 1); if (already_done) { for (;;) { -- cgit v1.2.3