diff options
author | Agustina Arzille <avarzille@riseup.net> | 2017-04-03 16:09:51 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-04-04 22:07:06 +0200 |
commit | b1730c99f882fc2662c6b64371a4b11a8231bb9f (patch) | |
tree | c4fa5fa51287aee6d6cb372f1cfa8f6413ababd6 /kern/panic.c | |
parent | d5bb14cf6a8305bda2a5a73ce727e5309996a20a (diff) |
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.
Diffstat (limited to 'kern/panic.c')
-rw-r--r-- | kern/panic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/panic.c b/kern/panic.c index e0bf30c..a9599f2 100644 --- a/kern/panic.c +++ b/kern/panic.c @@ -17,9 +17,9 @@ #include <stdarg.h> +#include <kern/atomic.h> #include <kern/panic.h> #include <kern/printk.h> -#include <machine/atomic.h> #include <machine/cpu.h> #include <machine/strace.h> @@ -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 (;;) { |