diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-28 03:06:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-28 03:06:10 +0000 |
commit | 3e3a661612c8296ecbe74b7f3b09965dacbb7ff9 (patch) | |
tree | 31bcf682861c81d34d0528babee47b8a1d4c44ba /sys/amd64/amd64/db_interface.c | |
parent | dea228e37800fc07cb4619f31e155310a4bad233 (diff) | |
download | FreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.zip FreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.tar.gz |
Switch from save/disable/restore_intr() to critical_enter/exit().
Diffstat (limited to 'sys/amd64/amd64/db_interface.c')
-rw-r--r-- | sys/amd64/amd64/db_interface.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index ee4ab19..ea2b862 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -309,7 +309,8 @@ Debugger(msg) const char *msg; { static volatile u_int in_Debugger; - int flags; + critical_t savecrit; + /* * XXX * Do nothing if the console is in graphics mode. This is @@ -319,12 +320,11 @@ Debugger(msg) if (cons_unavail && !(boothowto & RB_GDB)) return; - if (atomic_cmpset_int(&in_Debugger, 0, 1)) { - flags = save_intr(); - disable_intr(); + if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) { + savecrit = critical_enter(); db_printf("Debugger(\"%s\")\n", msg); breakpoint(); - restore_intr(flags); - in_Debugger = 0; + critical_exit(savecrit); + atomic_store_rel_int(&in_Debugger, 0); } } |