summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/db_interface.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c
index a801301..a2d07cb 100644
--- a/sys/amd64/amd64/db_interface.c
+++ b/sys/amd64/amd64/db_interface.c
@@ -306,7 +306,7 @@ void
Debugger(msg)
const char *msg;
{
- static volatile u_char in_Debugger;
+ static volatile u_int in_Debugger;
int flags;
/*
* XXX
@@ -317,14 +317,13 @@ Debugger(msg)
if (cons_unavail && !(boothowto & RB_GDB))
return;
- if (!in_Debugger) {
+ if (atomic_cmpset_int(&in_Debugger, 0, 1)) {
flags = save_intr();
disable_intr();
- in_Debugger = 1;
db_printf("Debugger(\"%s\")\n", msg);
breakpoint();
- in_Debugger = 0;
restore_intr(flags);
+ in_Debugger = 0;
}
}
OpenPOWER on IntegriCloud