mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-20 07:25:21 +00:00
The original implementation allows a list to be corrupted by list operations on the removed node. Existing code attempts to avoid this by using external state to determine whether a node is in a list, but this is fragile and fails when the state that holds the flag value is changed after the node is removed, e.g. in preparation for re-using the node. Follow Linux in invalidating the link pointers in a removed node. Add API so that detection of particpation in a list is available at the node abstraction. This solution relies on the following steady-state invariants: * A node (as opposed to a list) will never be adjacent to itself in a list; * The next and prev pointers of a node are always either both null or both non-null. Signed-off-by: Peter A. Bigot <pab@pabigot.com> |
||
---|---|---|
.. | ||
application_development | ||
benchmarks | ||
bluetooth | ||
boards | ||
booting/stub | ||
cmsis_rtos_v1 | ||
cmsis_rtos_v2 | ||
compliance | ||
coverage | ||
crypto | ||
drivers | ||
include | ||
kernel | ||
lib | ||
misc/test_build | ||
net | ||
posix | ||
shell | ||
subsys | ||
unit | ||
ztest | ||
CMakeLists.txt | ||
Kconfig |