Sync sys/queue.h with FreeBSD:
authorPeter Avalos <pavalos@theshell.com>
Sun, 15 Mar 2009 06:58:33 +0000 (20:58 -1000)
committerPeter Avalos <pavalos@theshell.com>
Tue, 7 Apr 2009 07:09:45 +0000 (21:09 -1000)
commitecd27a2e8c77bf6d392a35dc4a7356b54a00584b
tree4cfc1d2e4c2523492b69d1b8e0e019090529a500
parent0cc42b4f5ff356a187660fbb55eb09c1105effdd
Sync sys/queue.h with FreeBSD:

* Introduce REMOVE_NEXT() macro's for SLIST and STAILQ.

* Add sanity checking for QUEUE(3) TAILQs and LISTs under
INVARIANTS.  Races may lead to list corruption, which can be
difficult to unravel in a post-mortem analysis.  These checks verify
that the prev and next pointers are consistent when inserting or
removing elements, thus catching any corruption earlier.

* Use TRASHIT to break LIST and SLIST link pointers on element removal.

* Add more _FOREACH_MUTABLEs. Note: FreeBSD and NetBSD call these _SAFE,
but _MUTABLE is a better name, so that's what we're using.

* Add a macro for SLIST traversal 'SLIST_FOREACH_PREVPTR',
this macro keeps a pointer to the previous element's next
pointer to allow for search and O(1) removal.

* Remove CIRCLEQs and replace them with TAILQs.
share/man/man3/queue.3
sys/dev/crypto/ubsec/ubsec.c
sys/dev/drm/drm_drv.c
sys/kern/subr_rman.c
sys/netgraph/ppp/ng_ppp.c
sys/sys/queue.h
sys/sys/rman.h