Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5823
`RBTree_Node` has four members: the left child, the right child, the parent and the color. The color needs one bit, but its member takes four bytes, and eight bytes on 64-bit targets. A node is aligned to at least two bytes on every target, so bit 0 of the parent pointer is always zero and can hold the color, as in Linux. The node is part of every thread, watchdog, priority node, scheduler node and timer. A node of three pointers saves 4 bytes per node on 32-bit targets and 8 bytes on 64-bit targets. `pthread_mutex_t` of Newlib mirrors the node in `struct _RBTree_Node`. `mutexinit.c` checks the size and the member offsets of `POSIX_Mutex_Control` against it. A change of the node must keep these checks on every target without a change of Newlib. This description was created with Claude Code assistance. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5823 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-4639c3w1p0d4l94l9n4n88da5-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
