X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibmemory%2Fmemory_client.c;h=c66c71c43b1ebf19d67853760b66b075da075226;hb=57f177d0b7ad3002ba0d05dc8180f4b342ce5384;hp=d2323de00347b9d37d4e1a630c5d515e6d886522;hpb=6c89a35846e6884c69f5df6a28c91dfed5b24cc8;p=vpp.git diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c index d2323de0034..c66c71c43b1 100644 --- a/src/vlibmemory/memory_client.c +++ b/src/vlibmemory/memory_client.c @@ -510,6 +510,14 @@ vl_client_connect_to_vlib_thread_fn (const char *svm_name, thread_fn, arg, 1 /* do map */ ); } +void +vl_client_stop_rx_thread (svm_queue_t *vl_input_queue) +{ + vl_api_rx_thread_exit_t *ep; + ep = vl_msg_api_alloc (sizeof (*ep)); + ep->_vl_msg_id = ntohs (VL_API_RX_THREAD_EXIT); + vl_msg_api_send_shmem (vl_input_queue, (u8 *) &ep); +} static void disconnect_from_vlib_internal (u8 do_unmap) @@ -520,10 +528,7 @@ disconnect_from_vlib_internal (u8 do_unmap) if (mm->rx_thread_jmpbuf_valid) { - vl_api_rx_thread_exit_t *ep; - ep = vl_msg_api_alloc (sizeof (*ep)); - ep->_vl_msg_id = ntohs (VL_API_RX_THREAD_EXIT); - vl_msg_api_send_shmem (am->vl_input_queue, (u8 *) & ep); + vl_client_stop_rx_thread (am->vl_input_queue); pthread_join (mm->rx_thread_handle, (void **) &junk); } if (mm->connected_to_vlib)