Page MenuHomeFreeBSD

Simpilfy RB_REMOVE
ClosedPublic

Authored by dougm on May 27 2020, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:12 AM
Unknown Object (File)
Dec 2 2023, 10:36 PM
Unknown Object (File)
Nov 29 2023, 5:07 AM
Unknown Object (File)
Oct 10 2023, 5:28 PM
Unknown Object (File)
Apr 25 2023, 7:12 PM
Unknown Object (File)
Apr 8 2023, 12:46 AM
Unknown Object (File)
Feb 11 2023, 1:52 PM
Unknown Object (File)
Dec 29 2022, 9:39 AM
Subscribers

Details

Summary

RB_REMOVE invoke RB_REMOVE_COLOR either when child is red or child is null. In the first case, RB_REMOVE_COLOR just changes the child to black and returns. WIth this change, RB_REMOVE handles that case, and drops the child argument to RB_REMOVE_COLOR, since that value is always null.

RB_REMOVE_COLOR is changed to remove a couple of unneeded tests, and to eliminate some deep indentation.

RB_ISRED is defined to combine a null check with a test for redness, to replace that combination in several places.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm requested review of this revision.May 27 2020, 9:31 PM
dougm created this revision.

I ran stress2 tests for 39 hours with D25032.72341.diff, without seeing any problems

This revision is now accepted and ready to land.May 29 2020, 10:30 PM