zephyr/tests
Peter A. Bigot d40b8ce1fb sys: dlist: Add sys_dnode_is_linked
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>
2019-01-23 20:46:49 +01:00
..
application_development
benchmarks
bluetooth
boards
booting/stub
cmsis_rtos_v1
cmsis_rtos_v2
compliance
coverage
crypto
drivers tests: uart: Add tests for async UART API. 2019-01-22 18:54:12 +01:00
include
kernel sys: dlist: Add sys_dnode_is_linked 2019-01-23 20:46:49 +01:00
lib
misc/test_build
net
posix
shell
subsys
unit
ztest
CMakeLists.txt
Kconfig