kernel - Add more features to the RB tree
commit9967a09040ccea03df5d78df68902e6bf53c0528
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Oct 2017 06:34:14 +0000 (17 23:34 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Oct 2017 06:34:14 +0000 (17 23:34 -0700)
tree1b9dc1dc484037e117673fb047cf8c5fa80b120d
parent291b863628c74dfa05d3a3ff80137e1e26937517
kernel - Add more features to the RB tree

* Add RB_SCAN_NOLCK(), a version of RB_SCAN() that does not protect
  the iterator with a spin-lock.  This can be used in any scan loop
  where the scan loop is able to determine whether the iterator has
  been lost or not.

* Add RB_LOOKUP_REL(), a version of RB_LOOKUP() that optimizes the
  specific next-index and prev-index case.
sys/sys/tree.h