summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-07-12 14:48:06 -0700
committerDamjan Marion <dmarion@me.com>2018-07-17 09:02:17 +0000
commit52207f1b7b60cb0784d5241f0a4d40eef531c67e (patch)
treeb83a1f01bd08872a2ae27e17f2fd0ddeb3f571b6 /src/svm
parent3c2fed5145d9e40a9ecd178c2866c813eddc6203 (diff)
session: send ctrl msg over mq
Change-Id: I242056bc46ddb671064665916b2687860292dcb2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/message_queue.c3
-rw-r--r--src/svm/message_queue.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/svm/message_queue.c b/src/svm/message_queue.c
index 89411143c12..77c15ed4654 100644
--- a/src/svm/message_queue.c
+++ b/src/svm/message_queue.c
@@ -200,10 +200,11 @@ svm_msg_q_add (svm_msg_q_t * mq, svm_msg_q_msg_t * msg, int nowait)
}
void
-svm_msg_q_add_w_lock (svm_msg_q_t * mq, svm_msg_q_msg_t * msg)
+svm_msg_q_add_and_unlock (svm_msg_q_t * mq, svm_msg_q_msg_t * msg)
{
ASSERT (svm_msq_q_msg_is_valid (mq, msg));
svm_queue_add_raw (mq->q, (u8 *) msg);
+ svm_msg_q_unlock (mq);
}
int
diff --git a/src/svm/message_queue.h b/src/svm/message_queue.h
index 708a03d716e..5ff0c4be103 100644
--- a/src/svm/message_queue.h
+++ b/src/svm/message_queue.h
@@ -163,7 +163,7 @@ int svm_msg_q_add (svm_msg_q_t * mq, svm_msg_q_msg_t * msg, int nowait);
* @param msg message (pointer to ring position) to be enqueued
* @return success status
*/
-void svm_msg_q_add_w_lock (svm_msg_q_t * mq, svm_msg_q_msg_t * msg);
+void svm_msg_q_add_and_unlock (svm_msg_q_t * mq, svm_msg_q_msg_t * msg);
/**
* Consumer dequeue one message from queue