Turn around the spinlock code to reduce the chance of programmer error.
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 8 Nov 2005 22:40:01 +0000 (22:40 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 8 Nov 2005 22:40:01 +0000 (22:40 +0000)
commit69d78e99f01efec17695f2914d374641c4958872
treefdb03d33274cb64007be4feb538d0f5474074e6f
parentfc17ad6067d54771a03a2778c0ad7d478d28b504
Turn around the spinlock code to reduce the chance of programmer error.
Remove spin_lock_crit() and spin_unlock_crit().  Instead make the primary
spinlock API, spin_lock() and spin_unlock(), enter and exit a critical
section.  Add two API functions, spin_lock_quick() and spin_unlock_quick()
which assume the caller is already in a critical section or that the spinlock
will never be used by a preempting thread (hardware interrupt or software
interrupt).
sys/kern/lwkt_thread.c
sys/sys/spinlock2.h
sys/sys/thread.h
sys/vm/vm_zone.c