summaryrefslogtreecommitdiff
path: root/kern/panic.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-01-03 23:54:23 +0100
committerRichard Braun <rbraun@sceen.net>2014-01-03 23:54:23 +0100
commitb53c5990ccc688e03d120c87940c7024eaca4813 (patch)
tree31f930608f9f140e6bccc8f2d5285cd3f1fb61f4 /kern/panic.c
parent99cef9617922016bda314a6e21b499e17e1af56e (diff)
Update calls to atomic operations
Make spin locks and mutexes encode their state on an int rather than a long.
Diffstat (limited to 'kern/panic.c')
-rw-r--r--kern/panic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kern/panic.c b/kern/panic.c
index bccf632b..252c4b68 100644
--- a/kern/panic.c
+++ b/kern/panic.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, 2013 Richard Braun.
+ * Copyright (c) 2010-2014 Richard Braun.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#include <machine/cpu.h>
#include <machine/strace.h>
-static unsigned long panic_done;
+static unsigned int panic_done;
void
panic(const char *format, ...)
@@ -31,7 +31,7 @@ panic(const char *format, ...)
va_list list;
unsigned long already_done;
- already_done = atomic_swap(&panic_done, 1);
+ already_done = atomic_swap_uint(&panic_done, 1);
if (already_done)
for (;;)