summaryrefslogtreecommitdiffstats
path: root/sys/sys/tree.h
Commit message (Collapse)AuthorAgeFilesLines
* Provide individual prototype and generate macros for the red-black tree.kib2015-01-241-25/+61
| | | | | | | This helps to reduce code size in statically linked applications. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 2 weeks
* In sys/tree.h:bms2009-03-011-1/+16
| | | | | | | | | | | | | | | | * Add RB_FOREACH_FROM() which continues traversal *at* the y-node provided. There is no pre-increment. * Nuke RB_FOREACH_SAFE as it was buggy; it would omit the final node. * Replace RB_FOREACH_SAFE() with a working implementation derived from RB_FOREACH_FROM(). The key observation is that we now only check the loop-control variable, but still cache the next member pointer. * Add RB_FOREACH_REVERSE_FROM() which continues backwards traversal *at* the y-node provided. There is no pre-increment. Typically this is used to back out of allocations made whilst walking an RB-tree. * Add RB_FOREACH_REVERSE_SAFE() which performs insertion and deletion safe backwards traversal.
* Add macro RB_FOREACH_SAFE(), which accepts an additional argumentbms2008-12-241-0/+5
| | | | | specifying a temporary tree node pointer. It may be used in a similar way to the *_SAFE() macros in <sys/queue.h>.
* Implement RB_PREV() AND RB_FOREACH_REVERSE().jasone2007-12-281-0/+29
|
* Simplify/optimize RB_NFIND().jasone2007-06-151-19/+11
| | | | Submitted by: Andriy Gapon <avg@icyb.net.ua>
* Add the RB_PROTOTYPE_STATIC and RB_GENERATE_STATIC macros.jasone2006-01-191-18/+28
| | | | Approved by: markm (mentor)
* Add the RB_NFIND() macro, which is useful for red-black tree searchesjasone2006-01-111-0/+31
| | | | | | | for which there may not be an exact match. Reviewed by: glebius, julian Approved by: markm (mentor)
* Make the default RB_AUGMENT() produce a 'do {} while (0)' insteadharti2005-06-101-1/+1
| | | | | of nothing. This prevents the compiler from complaining about empty if statements when compiled with higher WARN levels.
* Add FreeBSD tagimp2005-01-071-1/+3
|
* Synch with NetBSD: avoid "unused parameter" warning.des2004-03-291-5/+5
|
* Import the original directly from NetBSD instead of via OpenBSD.des2004-03-251-22/+26
|
* Sync with OpenBSD (two-year old bug fix)des2004-03-191-3/+5
|
* Import OpenBSD's <sys/tree.h>, needed by OpenSSH.des2002-06-231-0/+675
Obtained from: OpenBSD
OpenPOWER on IntegriCloud