mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
The red-black tree node held its links and its color in a nested member. The nesting came from the entry macro of the header which the previous commit removed. It served no purpose, and each access had to name the nested member. Move the links and the color into the node. Change the prefix of the fields from rbe_ of the entry to rbn_ of the node. The Linux API wrapper <linux/rbtree.h> renames the Linux fields with "#define rb_left rbn_left" and "#define rb_right rbn_right". Other Linux compatibility layers such as the linuxkpi of FreeBSD define rb_left and rb_right as object-like macros. The prefix rbn_ is no Linux name, so these macros leave the fields alone. The tests sprbtree01 and ts-unit-no-clock-0 passed on the boards of eight targets. Target Processor aarch64/zynqmp_apu Cortex-A53 LS1046A Cortex-A72 arm/zynqmp_rpu_lock_step Cortex-R5F arm/samrh71_flexram Cortex-M7 arm/xilinx_zynq_zc702 Cortex-A9 riscv/mpfs_e51 E51 riscv/mpfs_u54 U54 sparc/gr740 LEON4 Update #5804. Assisted-by: Claude:claude-opus-5-5 claude-code Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>