svm: queue sub: Add conditional timed wait

On reviece side svm queue only permits blocking and
non-blocking calls. This patch adds timed wait blocking
functionality which returns either on signal/event or
on given time out.

It also preserves the original behavior, so it will not
hurt client applications which are using svm queue.

Change-Id: Ic10632170330a80afb8bc781d4ccddfe4da2c69a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index d419626..3b9c0f4 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -758,7 +758,7 @@
 {
   uword msg;
 
-  while (!svm_queue_sub (q, (u8 *) & msg, 0))
+  while (!svm_queue_sub (q, (u8 *) & msg, SVM_Q_WAIT, 0))
     vl_msg_api_handler ((void *) msg);
 }