freebsd-skq/sys/amd64/isa
Bosko Milekic 9ed346bab0 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00
..
atpic_vector.S Make intr_nesting_level per-process, rather than per-cpu. Setup 2001-01-21 19:25:07 +00:00
clock.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
icu_ipl.s Implement an optimization for INTREN/INTRDIS that bde pointed out last 2001-01-15 04:18:58 +00:00
icu_ipl.S Implement an optimization for INTREN/INTRDIS that bde pointed out last 2001-01-15 04:18:58 +00:00
icu_vector.s Make intr_nesting_level per-process, rather than per-cpu. Setup 2001-01-21 19:25:07 +00:00
icu_vector.S Make intr_nesting_level per-process, rather than per-cpu. Setup 2001-01-21 19:25:07 +00:00
icu.h EEK! I missed a couple of places with the 24->32 interrupt change. 2001-01-19 10:55:13 +00:00
intr_machdep.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
intr_machdep.h Remove the Xforward_irq IPI. 2001-01-24 10:01:13 +00:00
isa_dma.c Add PnP probe methods to some common AT hardware drivers. In each case, 2000-06-23 07:44:33 +00:00
isa_dma.h Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags. 2000-03-13 10:19:32 +00:00
isa.c Convert the type of bus_space_handle_t of pc98 from structure into 2000-10-20 02:42:06 +00:00
isa.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ithread.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
nmi.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
npx.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
timerreg.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vector.s Major update to the way synchronization is done in the kernel. Highlights 2000-09-07 01:33:02 +00:00
vector.S Major update to the way synchronization is done in the kernel. Highlights 2000-09-07 01:33:02 +00:00