summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/db_interface.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-12-18 00:27:18 +0000
committerjhb <jhb@FreeBSD.org>2001-12-18 00:27:18 +0000
commita3b98398cbfb4b809f8577b6a95aabb2c30a1aeb (patch)
treebd1f842c61588e8478e798dece6dff8b2be41310 /sys/amd64/amd64/db_interface.c
parent090c933e94e7345e9c9e9a9fbe29ea6c8397a662 (diff)
downloadFreeBSD-src-a3b98398cbfb4b809f8577b6a95aabb2c30a1aeb.zip
FreeBSD-src-a3b98398cbfb4b809f8577b6a95aabb2c30a1aeb.tar.gz
Modify the critical section API as follows:
- The MD functions critical_enter/exit are renamed to start with a cpu_ prefix. - MI wrapper functions critical_enter/exit maintain a per-thread nesting count and a per-thread critical section saved state set when entering a critical section while at nesting level 0 and restored when exiting to nesting level 0. This moves the saved state out of spin mutexes so that interlocking spin mutexes works properly. - Most low-level MD code that used critical_enter/exit now use cpu_critical_enter/exit. MI code such as device drivers and spin mutexes use the MI wrappers. Note that since the MI wrappers store the state in the current thread, they do not have any return values or arguments. - mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is assigned to curthread->td_savecrit during fork_exit(). Tested on: i386, alpha
Diffstat (limited to 'sys/amd64/amd64/db_interface.c')
-rw-r--r--sys/amd64/amd64/db_interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c
index 9708cad..000085b 100644
--- a/sys/amd64/amd64/db_interface.c
+++ b/sys/amd64/amd64/db_interface.c
@@ -324,10 +324,10 @@ Debugger(msg)
return;
if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) {
- savecrit = critical_enter();
+ savecrit = cpu_critical_enter();
db_printf("Debugger(\"%s\")\n", msg);
breakpoint();
- critical_exit(savecrit);
+ cpu_critical_exit(savecrit);
atomic_store_rel_int(&in_Debugger, 0);
}
}
OpenPOWER on IntegriCloud