freebsd-skq/sys/ia64/include
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
..
pc
_limits.h Adjust comments 2000-10-24 10:49:56 +00:00
ansi.h Put VCS ids in a consistent place and form. 2001-01-08 06:24:08 +00:00
asm.h Next round of fixes to the ia64 code. This includes simulated clock and 2000-10-04 17:53:03 +00:00
atomic.h Implement atomic_{set,clear,add,subtract}_{acq_,rel_,}_ptr() 2000-10-25 00:16:38 +00:00
bootinfo.h
bus_memio.h
bus_pio.h
bus.h Axe the barrier_{read,write,rw}() helper functions as this method of 2000-10-20 06:45:48 +00:00
clock.h Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
clockvar.h
cpu.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
cpufunc.h
db_machdep.h * Add rudimentary DDB support (no kgdb, no backtrace, no single step). 2000-10-10 14:57:10 +00:00
efi.h Flesh out EFI support somewhat. 2001-01-29 13:31:19 +00:00
elf.h
endian.h
exec.h
float.h
floatingpoint.h
fpu.h
frame.h * Various fixes to breakage introduced by the atomic and mutex reorgs. 2000-10-24 19:54:38 +00:00
globaldata.h Add gd_witness_spin_check. 2001-01-28 08:06:50 +00:00
globals.h - Remove compatibility macros for accessing per-cpu variables. 2001-01-11 14:46:26 +00:00
ia64_cpu.h * Various fixes to breakage introduced by the atomic and mutex reorgs. 2000-10-24 19:54:38 +00:00
ieee.h
ieeefp.h
in_cksum.h
inst.h * Add rudimentary DDB support (no kgdb, no backtrace, no single step). 2000-10-10 14:57:10 +00:00
intr.h
intrcnt.h
ioctl_bt848.h
ioctl_fd.h
ioctl_meteor.h
ipl.h - Overhaul the software interrupt code to use interrupt threads for each 2000-10-25 05:19:40 +00:00
limits.h Adjust comments 2000-10-24 10:49:56 +00:00
lock.h Convert all simplelocks to mutexes and remove the simplelock implementations. 2001-01-24 12:35:55 +00:00
md_var.h Remove the last of the MD netisr code. It is now all MI. Remove 2000-12-05 00:36:00 +00:00
mutex.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
pal.h Next round of fixes to the ia64 code. This includes simulated clock and 2000-10-04 17:53:03 +00:00
param.h Merge ALIGN changes from alpha code. 2000-12-30 13:06:01 +00:00
pcb.h * Fix exception handling so that it actually works. We can now handle 2000-10-12 14:36:39 +00:00
pcpu.h Add gd_witness_spin_check. 2001-01-28 08:06:50 +00:00
pmap.h * Add rudimentary DDB support (no kgdb, no backtrace, no single step). 2000-10-10 14:57:10 +00:00
proc.h * Fix exception handling so that it actually works. We can now handle 2000-10-12 14:36:39 +00:00
profile.h Next round of fixes to the ia64 code. This includes simulated clock and 2000-10-04 17:53:03 +00:00
ptrace.h
reg.h * Fix exception handling so that it actually works. We can now handle 2000-10-12 14:36:39 +00:00
reloc.h
resource.h
setjmp.h Work around a bug by adding struct tags. gcc-2.95 apparently gets the 2000-10-06 11:53:32 +00:00
sigframe.h
signal.h Make MINSIGSTKSZ machine dependent, and have the sigaltstack 2000-11-09 08:25:48 +00:00
smp.h
stdarg.h
sysarch.h
types.h
ucontext.h * Various fixes to breakage introduced by the atomic and mutex reorgs. 2000-10-24 19:54:38 +00:00
varargs.h
vmparam.h Next round of fixes to the ia64 code. This includes simulated clock and 2000-10-04 17:53:03 +00:00