]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Modify the critical section API as follows:
authorjhb <jhb@FreeBSD.org>
Tue, 18 Dec 2001 00:27:18 +0000 (00:27 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 18 Dec 2001 00:27:18 +0000 (00:27 +0000)
commita3b98398cbfb4b809f8577b6a95aabb2c30a1aeb
treebd1f842c61588e8478e798dece6dff8b2be41310
parent090c933e94e7345e9c9e9a9fbe29ea6c8397a662
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
61 files changed:
sys/alpha/alpha/db_interface.c
sys/alpha/alpha/genassym.c
sys/alpha/alpha/interrupt.c
sys/alpha/alpha/machdep.c
sys/alpha/alpha/prom.c
sys/alpha/alpha/trap.c
sys/alpha/include/cpufunc.h
sys/alpha/include/mutex.h
sys/alpha/pci/cia.c
sys/alpha/pci/t2.c
sys/alpha/pci/t2_pci.c
sys/amd64/amd64/db_interface.c
sys/amd64/amd64/fpu.c
sys/amd64/amd64/genassym.c
sys/amd64/amd64/initcpu.c
sys/amd64/amd64/sys_machdep.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/include/cpufunc.h
sys/amd64/include/mutex.h
sys/amd64/isa/npx.c
sys/dev/bktr/bktr_os.h
sys/dev/cy/cy.c
sys/dev/cy/cy_isa.c
sys/dev/sound/isa/mpu.c
sys/i386/i386/db_interface.c
sys/i386/i386/genassym.c
sys/i386/i386/initcpu.c
sys/i386/i386/perfmon.c
sys/i386/i386/sys_machdep.c
sys/i386/i386/vm_machdep.c
sys/i386/include/cpufunc.h
sys/i386/include/mutex.h
sys/i386/isa/cy.c
sys/i386/isa/npx.c
sys/ia64/ia64/db_interface.c
sys/ia64/ia64/genassym.c
sys/ia64/ia64/pmap.c
sys/ia64/ia64/sapic.c
sys/ia64/include/cpufunc.h
sys/ia64/include/mutex.h
sys/ia64/include/profile.h
sys/kern/kern_fork.c
sys/kern/kern_idle.c
sys/kern/kern_ktr.c
sys/kern/kern_mutex.c
sys/kern/kern_switch.c
sys/kern/kern_synch.c
sys/kern/subr_prof.c
sys/kern/subr_trap.c
sys/kern/subr_turnstile.c
sys/kern/subr_witness.c
sys/powerpc/include/cpufunc.h
sys/powerpc/include/mutex.h
sys/powerpc/powerpc/genassym.c
sys/sparc64/include/cpufunc.h
sys/sparc64/include/mutex.h
sys/sparc64/sparc64/intr_machdep.c
sys/sys/_mutex.h
sys/sys/mutex.h
sys/sys/proc.h
sys/sys/systm.h