diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2018-01-04 18:57:26 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-01-22 18:17:23 +0000 |
commit | 3fca567ff438145e28dd1318ad5b1734c1091257 (patch) | |
tree | 7101b4ae130f2731e549f82ab98af8bfbabc6571 /src/tests/vnet/session/tcp_echo.c | |
parent | e82488f10f20f464961c5c7b381b4a419bca0bbc (diff) |
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>
Diffstat (limited to 'src/tests/vnet/session/tcp_echo.c')
-rw-r--r-- | src/tests/vnet/session/tcp_echo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/vnet/session/tcp_echo.c b/src/tests/vnet/session/tcp_echo.c index ed9e2f7b780..3fef65ae304 100644 --- a/src/tests/vnet/session/tcp_echo.c +++ b/src/tests/vnet/session/tcp_echo.c @@ -505,7 +505,7 @@ client_handle_event_queue (uri_tcp_test_main_t * utm) { session_fifo_event_t _e, *e = &_e;; - svm_queue_sub (utm->our_event_queue, (u8 *) e, 0 /* nowait */ ); + svm_queue_sub (utm->our_event_queue, (u8 *) e, SVM_Q_WAIT, 0); switch (e->event_type) { case FIFO_EVENT_APP_RX: @@ -530,7 +530,7 @@ client_rx_thread_fn (void *arg) utm->client_bytes_received = 0; while (1) { - svm_queue_sub (utm->our_event_queue, (u8 *) e, 0 /* nowait */ ); + svm_queue_sub (utm->our_event_queue, (u8 *) e, SVM_Q_WAIT, 0); switch (e->event_type) { case FIFO_EVENT_APP_RX: @@ -1027,7 +1027,7 @@ server_handle_event_queue (uri_tcp_test_main_t * utm) while (1) { - svm_queue_sub (utm->our_event_queue, (u8 *) e, 0 /* nowait */ ); + svm_queue_sub (utm->our_event_queue, (u8 *) e, SVM_Q_WAIT, 0); switch (e->event_type) { case FIFO_EVENT_APP_RX: |