Go to file
Benjamin Walsh d032bb88cc dlist: add SYS_DLIST_ITERATE_FROM_NODE()
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>
2017-02-16 04:56:22 +00:00
.known-issues
arch
boards doc: boards: Move nRF5x DK board doc from the wiki to git 2017-02-15 10:16:02 +00:00
doc
drivers
dts
ext
include dlist: add SYS_DLIST_ITERATE_FROM_NODE() 2017-02-16 04:56:22 +00:00
kernel kernel: fix typo 2017-02-16 04:56:22 +00:00
lib
misc
samples samples: net: Add README.rst to echo apps 2017-02-15 12:20:08 +02:00
scripts
subsys net/mqtt: Remove length computations for some msg fields 2017-02-15 12:20:08 +02:00
tests net/mqtt: Remove length computations for some msg fields 2017-02-15 12:20:08 +02:00
.checkpatch.conf
.gitattributes
.gitignore
.gitreview
.mailmap
defaults.tc
Kbuild
Kconfig
Kconfig.zephyr
LICENSE
MAINTAINERS
Makefile bump version to v1.7.99 2017-02-15 05:46:45 -08:00
Makefile.inc
Makefile.test
zephyr-env.sh