svm: add unidirectional message queue

Meant for single reader/writer message exchanges. Supports multiple
message rings.

Change-Id: I925de9a6ae19226c5c39a63caff76424ed123a13
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/svm.am b/src/svm.am
index c29072e..7413e67 100644
--- a/src/svm.am
+++ b/src/svm.am
@@ -13,13 +13,14 @@
 
 bin_PROGRAMS += svmtool svmdbtool
 
-nobase_include_HEADERS += 			\
+nobase_include_HEADERS += 		\
   svm/ssvm.h 					\
   svm/svm_common.h 				\
   svm/svmdb.h 					\
   svm/svm_fifo.h 				\
-  svm/svm_fifo_segment.h			\
+  svm/svm_fifo_segment.h		\
   svm/queue.h					\
+  svm/message_queue.h			\
   svm/svm.h
 
 lib_LTLIBRARIES += libsvm.la libsvmdb.la
@@ -28,8 +29,9 @@
   svm/svm.c 					\
   svm/ssvm.c 					\
   svm/svm_fifo.c 				\
-  svm/svm_fifo_segment.c			\
-  svm/queue.c
+  svm/svm_fifo_segment.c		\
+  svm/queue.c					\
+  svm/message_queue.c
 
 libsvm_la_LIBADD = libvppinfra.la -lrt -lpthread
 libsvm_la_DEPENDENCIES = libvppinfra.la
@@ -44,9 +46,16 @@
 svmdbtool_SOURCES = svm/svmdbtool.c
 svmdbtool_LDADD = libsvmdb.la libsvm.la libvppinfra.la -lpthread -lrt
 
-noinst_PROGRAMS += test_svm_fifo1
+noinst_PROGRAMS += 				\
+  test_svm_fifo1				\
+  test_svm_message_queue
+
 test_svm_fifo1_SOURCES = svm/test_svm_fifo1.c
 test_svm_fifo1_LDADD = libsvm.la libvppinfra.la -lpthread -lrt
 test_svm_fifo1_LDFLAGS = -static
 
+test_svm_message_queue_SOURCES = svm/test_svm_message_queue.c
+test_svm_message_queue_LDADD = libsvm.la libvppinfra.la -lpthread -lrt
+test_svm_message_queue_LDFLAGS = -static
+
 # vi:syntax=automake