]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Eliminate the color field from the RB element struct. Identify the
authorDoug Moore <dougm@FreeBSD.org>
Thu, 25 Jun 2020 17:44:14 +0000 (17:44 +0000)
committerDoug Moore <dougm@FreeBSD.org>
Thu, 25 Jun 2020 17:44:14 +0000 (17:44 +0000)
commit3a509754ded1408eb5a28fd11f1e549846356c76
tree1d2c13ab351ab2580ea8f09d8d6b5466d83b3644
parent7c228be30bd14fd8b683426bc91a608827426abf
Eliminate the color field from the RB element struct. Identify the
color of a node (or, really, the color of the link from the parent to
the node) by using one of the last two bits of the parent pointer in
that parent node. Adjust rebalancing methods to account for where
colors are stored, and the fact that null children have a color too.

Adjust RB_PARENT and RB_SET_PARENT to account for this change.

Reviewed by: markj
Tested by: pho, hselasky
Differential Revision: https://reviews.freebsd.org/D25418
sys/sys/tree.h