freebsd-dev/sys/netgraph
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
..
netgraph.h Make netgraph modules refuse to link with modules of a different ABI version. 2001-02-05 18:57:11 +00:00
ng_async.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_async.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_base.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
ng_bpf.c Fix cut and paste error in a comment. 2001-01-30 07:58:30 +00:00
ng_bpf.h Fix cut and paste error in a comment. 2001-01-30 07:58:30 +00:00
ng_bridge.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_bridge.h New netgraph node type for Ethernet bridging. 2000-09-01 01:37:13 +00:00
ng_cisco.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_cisco.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_echo.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_echo.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_ether.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_ether.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_frame_relay.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_frame_relay.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_hole.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_hole.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_iface.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_iface.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_ksocket.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_ksocket.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_lmi.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_lmi.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_message.h Clean up reference counting with relation to queued packets and the worklist, 2001-02-01 20:51:23 +00:00
ng_mppc.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_mppc.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_one2many.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_one2many.h Add a new distribution algorythm to the 'one2many' node type. 2001-01-28 15:37:06 +00:00
ng_parse.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_parse.h Go back to using data_len in struct ngpppoe_init_data after discussions 2000-11-16 23:14:53 +00:00
ng_ppp.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_ppp.h More complete fix for multi-link sequence number handling bugs. 2000-10-06 23:42:02 +00:00
ng_pppoe.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_pppoe.h I have no idea at all why this file was not included in the last commit. 2000-12-12 22:35:36 +00:00
ng_pptpgre.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_pptpgre.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_rfc1490.c Missing FREE(). 2001-01-09 00:49:31 +00:00
ng_rfc1490.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_sample.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_sample.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_socket.c Add a dummy disconnect function so that the socket code doesn't leap into 2001-02-05 20:48:04 +00:00
ng_socket.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_socketvar.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_tee.c Swap egress hooks for packets entering from the monitor hooks. 2001-01-26 11:35:36 +00:00
ng_tee.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_tty.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_tty.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_UI.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_UI.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_vjc.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_vjc.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
NOTES Rewrite of netgraph to start getting ready for SMP. 2001-01-06 00:46:47 +00:00