Date: Sun, 1 Mar 2009 04:57:23 +0000 (UTC) From: Bruce M Simpson <bms@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/sys tree.h Message-ID: <200903010457.n214vbhM025706@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bms 2009-03-01 04:57:23 UTC FreeBSD src repository Modified files: sys/sys tree.h Log: SVN rev 189204 on 2009-03-01 04:57:23Z by bms In sys/tree.h: * 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. Revision Changes Path 1.9 +16 -1 src/sys/sys/tree.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903010457.n214vbhM025706>