mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
core/lib/clist: fix example of clist_foreach usage
Also fix some doxygen rendering issues.
This commit is contained in:
parent
5d26414ecf
commit
79a54c5741
@ -62,20 +62,21 @@
|
|||||||
*
|
*
|
||||||
* Or use the clist_foreach() helper function, e.g.,:
|
* Or use the clist_foreach() helper function, e.g.,:
|
||||||
*
|
*
|
||||||
* static int _print_node(clist_node_t *node)
|
* static int _print_node(clist_node_t *node, void *arg)
|
||||||
* {
|
* {
|
||||||
|
* (void) arg; // unused optional argument
|
||||||
* printf("0x%08x ", (unsigned)node);
|
* printf("0x%08x ", (unsigned)node);
|
||||||
* return 0;
|
* return 0;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* [...]
|
* [...]
|
||||||
* clist_foreach(&list, _print_node);
|
* clist_foreach(&list, _print_node, NULL);
|
||||||
*
|
*
|
||||||
* To use clist as a queue, use clist_rpush() for adding elements and clist_lpop()
|
* To use clist as a queue, use clist_rpush() for adding elements and clist_lpop()
|
||||||
* for removal. Using clist_lpush() and clist_rpop() is inefficient due to
|
* for removal. Using clist_lpush() and clist_rpop() is inefficient due to
|
||||||
* clist_rpop()'s O(n) runtime.
|
* clist_rpop()'s O(n) runtime.
|
||||||
*
|
*
|
||||||
* To use clist as stack, use clist_lpush()/clist_lpop().
|
* To use clist as stack, use clist_lpush() / clist_lpop().
|
||||||
*
|
*
|
||||||
* Implementation details:
|
* Implementation details:
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user