freebsd-nq/sys/net
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
..
bpf_compat.h Small fix for bpf compat: 2000-12-27 22:20:13 +00:00
bpf_filter.c
bpf.c Supply a stub bpf_validate() (always returning false - the script is not 2001-01-29 13:26:14 +00:00
bpf.h
bpfdesc.h select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
bridge.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
bridge.h MFS: bridge/ipfw/dummynet fixes (bridge.c will be committed separately) 2001-02-02 00:18:00 +00:00
bsd_comp.c
ethernet.h
fddi.h
hostcache.c Use <sys/queue.h> macro api rather than fondle its implementation detals. 2001-02-03 11:46:35 +00:00
hostcache.h
if_arp.h
if_atm.h
if_atmsubr.c Another round of the <sys/queue.h> FOREACH transmogriffer. 2001-02-04 16:08:18 +00:00
if_disc.c Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
if_dl.h
if_ef.c Another round of the <sys/queue.h> FOREACH transmogriffer. 2001-02-04 16:08:18 +00:00
if_ethersubr.c When we receive an incoming Ethernet frame that was unicast to a 2001-02-08 17:56:49 +00:00
if_faith.c Pull the rug from under the 'LKM Compatability' macro - PSEUDO_SET(). 2001-02-04 11:46:17 +00:00
if_fddisubr.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
if_gif.c * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
if_gif.h
if_ieee80211.h Add some additional message types for coming raylan driver from Duncan 2000-10-30 06:03:57 +00:00
if_iso88025subr.c Lock down the network interface queues. The queue mutex must be obtained 2000-11-25 07:35:38 +00:00
if_llc.h
if_loop.c Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
if_media.c Another round of the <sys/queue.h> FOREACH transmogriffer. 2001-02-04 16:08:18 +00:00
if_media.h
if_mib.c
if_mib.h
if_ppp.c Quieten gcc. 2001-01-31 08:27:09 +00:00
if_ppp.h
if_pppvar.h
if_sl.c Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
if_slvar.h
if_sppp.h
if_spppsubr.c Use <sys/queue.h> macro api rather than fondle its implementation detals. 2001-02-03 11:46:35 +00:00
if_stf.c Use <sys/queue.h> macro api rather than fondle its implementation detals. 2001-02-03 11:46:35 +00:00
if_stf.h
if_tap.c Pass the minor number rather than the unit number to make_dev() 2001-02-02 03:32:25 +00:00
if_tap.h
if_tapvar.h
if_tun.c Another round of the <sys/queue.h> FOREACH transmogriffer. 2001-02-04 16:08:18 +00:00
if_tun.h
if_tunvar.h
if_types.h
if_var.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
if_vlan_var.h
if_vlan.c Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
if.c Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
if.h Fix typo: compatability -> compatibility. 2001-02-06 12:05:58 +00:00
intrq.c Lock down the network interface queues. The queue mutex must be obtained 2000-11-25 07:35:38 +00:00
intrq.h
iso88025.h
net_osdep.c
net_osdep.h Pull the rug from under the 'LKM Compatability' macro - PSEUDO_SET(). 2001-02-04 11:46:17 +00:00
netisr.h Remove the last of the MD netisr code. It is now all MI. Remove 2000-12-05 00:36:00 +00:00
pfil.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
pfil.h
pfkeyv2.h
ppp_comp.h
ppp_deflate.c
ppp_defs.h
ppp_tty.c * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
radix.c
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
route.c
route.h
rtsock.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c
zlib.h