summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-26 02:28:35 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-26 02:28:35 +0200
commit493ecb4ffa9e15d1d88350eab6812a82762137e4 (patch)
tree4d6bd7ae3375e768f3f6d9eae768a42cf1e630cb /doc
parentzebra: Add kernel level graceful restart (#4301) (diff)
downloadfrr-493ecb4ffa9e15d1d88350eab6812a82762137e4.tar.xz
frr-493ecb4ffa9e15d1d88350eab6812a82762137e4.zip
doc: Update docs to represent changes on the ground
The lists documentation had not been updated to represent the for_eachXXX to frr_eachXXX changes. Make it so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/developer/lists.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/developer/lists.rst b/doc/developer/lists.rst
index 58c17248d..fc47a67e4 100644
--- a/doc/developer/lists.rst
+++ b/doc/developer/lists.rst
@@ -115,7 +115,7 @@ Functions provided:
+------------------------------------+------+------+------+---------+------------+
| _find_lt, _find_gteq | -- | -- | -- | yes | yes |
+------------------------------------+------+------+------+---------+------------+
-| use with for_each() macros | yes | yes | yes | yes | yes |
+| use with frr_each() macros | yes | yes | yes | yes | yes |
+------------------------------------+------+------+------+---------+------------+
@@ -176,7 +176,7 @@ Common iteration macros
The following iteration macros work across all data structures:
-.. c:function:: for_each(Z, &head, item)
+.. c:function:: frr_each(Z, &head, item)
Equivalent to:
@@ -187,7 +187,7 @@ The following iteration macros work across all data structures:
Note that this will fail if the list is modified while being iterated
over.
-.. c:function:: for_each_safe(Z, &head, item)
+.. c:function:: frr_each_safe(Z, &head, item)
Same as the previous, but the next element is pre-loaded into a "hidden"
variable (named ``Z_safe``.) Equivalent to:
@@ -206,7 +206,7 @@ The following iteration macros work across all data structures:
tables is resized while iterating. This will cause items to be
skipped or iterated over twice.
-.. c:function:: for_each_from(Z, &head, item, from)
+.. c:function:: frr_each_from(Z, &head, item, from)
Iterates over the list, starting at item ``from``. This variant is "safe"
as in the previous macro. Equivalent to:
@@ -363,7 +363,7 @@ are several functions exposed to insert data:
itemtype *prev = NULL, *item;
- for_each_safe(Z, head, item) {
+ frr_each_safe(Z, head, item) {
if (something) {
Z_add_after(head, prev, item);
break;
@@ -585,7 +585,7 @@ Iteration:
struct item *i;
pthread_rwlock_rdlock(&itemhead_rwlock);
- for_each(itemlist, &itemhead, i) {
+ frr_each(itemlist, &itemhead, i) {
/* lock must remain held while iterating */
...
}
@@ -602,7 +602,7 @@ Head removal (pop) and deallocation:
pthread_rwlock_unlock(&itemhead_rwlock);
/* i might still be visible for another thread doing an
- * for_each() (but won't be returned by another pop()) */
+ * frr_each() (but won't be returned by another pop()) */
...
pthread_rwlock_wrlock(&itemhead_rwlock);