mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 04:34:59 +00:00
Like SYS_DLIST_FOR_EACH_NODE(), but __dn contains a node where to fetch the next node from, NULL to start at the head. Note that the function does not iterate from @a node, but from node->next. This allows the following: sys_dnode_t *funcA(sys_dlist_t *list, sys_dnode_t *node) { SYS_DLIST_ITERATE_FROM_NODE(list, node) { if (node == <some condition>) { return node; } } return NULL; } sys_dlist_t list = &<some list>; sys_dnode_t *node = NULL; do { node = funcA(list, node) if (node == <some other condition>) { goto found; } } while(node); <handle error> found: <do stuff with node> Change-Id: I17a5787594a0ed1a4745bd2e1557dd54895105ca Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com> |
||
---|---|---|
.known-issues | ||
arch | ||
boards | ||
doc | ||
drivers | ||
dts | ||
ext | ||
include | ||
kernel | ||
lib | ||
misc | ||
samples | ||
scripts | ||
subsys | ||
tests | ||
.checkpatch.conf | ||
.gitattributes | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
defaults.tc | ||
Kbuild | ||
Kconfig | ||
Kconfig.zephyr | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
Makefile.inc | ||
Makefile.test | ||
zephyr-env.sh |