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 doc/api/networking: Add existing network protocol libraries APIs 2017-02-03 15:59:18 +02:00
arch arc: add _tsc_read for 64-bit timestamp 2017-02-15 05:55:09 +00:00
boards doc: boards: Move nRF5x DK board doc from the wiki to git 2017-02-15 10:16:02 +00:00
doc arc: enable gen_isr_tables mechanism 2017-02-15 04:54:47 +00:00
drivers Merge "Merge remote-tracking branch 'origin/core'" 2017-02-15 04:33:25 +00:00
dts dts: hexiwear: fix fixup to use correct define 2017-02-11 07:00:38 +00:00
ext ext/lib/mbedtls: Add the TLS configuration file 2017-02-14 08:30:35 +02:00
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 Merge "Merge remote-tracking branch 'origin/core'" 2017-02-15 04:33:25 +00:00
misc misc: Let the compiler choose whether to omit frame pointer 2017-02-08 13:14:16 +00:00
samples samples: net: Add README.rst to echo apps 2017-02-15 12:20:08 +02:00
scripts Merge "Merge remote-tracking branch 'origin/core'" 2017-02-15 04:33:25 +00:00
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 checkpatch: Remove reference to legacy IP stack 2017-02-08 13:05:27 +00:00
.gitattributes
.gitignore gitignore: Ignore Eclipse (Xtensa Xplorer) project files. 2017-02-13 08:04:27 -08:00
.gitreview
.mailmap mailmap: added axy (for Anas Nashif) 2016-12-21 13:49:59 +00:00
defaults.tc testcases: catch more fatal kernel error messages 2016-11-11 13:21:16 +00:00
Kbuild Changed Kbuild to pass also KBUILD_CPPFLAGS to CC on addition to KBUILD_CFLAGS. 2017-02-13 08:04:27 -08:00
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig.zephyr license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
LICENSE
MAINTAINERS MAINTAINERS: added maintainer for riscv32 2017-02-03 19:31:41 +01:00
Makefile bump version to v1.7.99 2017-02-15 05:46:45 -08:00
Makefile.inc build: abstract emulation and replace qemu goal with run 2017-01-10 20:20:47 +00:00
Makefile.test tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
zephyr-env.sh license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00