summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2019-01-21 17:14:36 -0800
committerBen Pfaff <blp@ovn.org>2019-01-22 14:42:16 -0800
commit6e87f9f47e36eb420e321d4788f9c061461ab188 (patch)
tree56f67787bceb46569d888029cac92bccbefd0a0f
parentfe2870c574db6694d74a494794ee3a004c27c8f0 (diff)
downloadopenvswitch-6e87f9f47e36eb420e321d4788f9c061461ab188.tar.gz
seq: Correct example in comment.
It was deceptive for the example to imply that a seq can be declared directly, because the API only allows for creating a new one on the heap. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ilya Maximets <i.maximets@samsung.com>
-rw-r--r--lib/seq.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/seq.h b/lib/seq.h
index 221ab9acd..92743c1eb 100644
--- a/lib/seq.h
+++ b/lib/seq.h
@@ -77,14 +77,14 @@
*
* struct ovs_mutex mutex;
* struct ovs_list queue OVS_GUARDED_BY(mutex);
- * struct seq nonempty_seq;
+ * struct seq *nonempty_seq;
*
* To add an element to the queue:
*
* ovs_mutex_lock(&mutex);
* ovs_list_push_back(&queue, ...element...);
* if (ovs_list_is_singleton(&queue)) { // The 'if' test here is optional.
- * seq_change(&nonempty_seq);
+ * seq_change(nonempty_seq);
* }
* ovs_mutex_unlock(&mutex);
*
@@ -92,7 +92,7 @@
*
* ovs_mutex_lock(&mutex);
* if (ovs_list_is_empty(&queue)) {
- * seq_wait(&nonempty_seq, seq_read(&nonempty_seq));
+ * seq_wait(nonempty_seq, seq_read(nonempty_seq));
* } else {
* poll_immediate_wake();
* }