summaryrefslogtreecommitdiffstats
path: root/src/svm/message_queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm/message_queue.h')
-rw-r--r--src/svm/message_queue.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/svm/message_queue.h b/src/svm/message_queue.h
index 1ef773d9f0a..0e402c5a409 100644
--- a/src/svm/message_queue.h
+++ b/src/svm/message_queue.h
@@ -399,12 +399,20 @@ svm_msg_q_unlock (svm_msg_q_t * mq)
/**
* Wait for message queue event
*
- * Must be called with mutex held. The queue only works non-blocking
- * with eventfds, so handle blocking calls as an exception here.
+ * When eventfds are not configured, the shared memory mutex is locked
+ * before waiting on the condvar. Typically called by consumers.
*/
int svm_msg_q_wait (svm_msg_q_t *mq, svm_msg_q_wait_type_t type);
/**
+ * Wait for message queue event as producer
+ *
+ * Similar to @ref svm_msg_q_wait but lock (mutex or spinlock) must
+ * be held. Should only be called by producers.
+ */
+int svm_msg_q_wait_prod (svm_msg_q_t *mq);
+
+/**
* Timed wait for message queue event
*
* Must be called with mutex held.