X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibapi%2Fapi_shared.c;h=24ec33b1506eccc380d001ba9d74b4b0f7316d45;hb=73710c7da2f8deaea83dbbbfce8737c9c6cd2949;hp=d41962640647f8c61b1c19c3f806b0494a376a62;hpb=e86a8edd3c14fb41ace2a12efd17bc7772bf623f;p=vpp.git diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c index d4196264064..24ec33b1506 100644 --- a/src/vlibapi/api_shared.c +++ b/src/vlibapi/api_shared.c @@ -758,7 +758,7 @@ vl_msg_api_queue_handler (svm_queue_t * q) { 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); } @@ -955,6 +955,23 @@ vl_msg_api_get_msg_index (u8 * name_and_crc) return ~0; } +void * +vl_msg_push_heap (void) +{ + api_main_t *am = &api_main; + pthread_mutex_lock (&am->vlib_rp->mutex); + return svm_push_data_heap (am->vlib_rp); +} + +void +vl_msg_pop_heap (void *oldheap) +{ + api_main_t *am = &api_main; + svm_pop_heap (oldheap); + pthread_mutex_unlock (&am->vlib_rp->mutex); +} + + /* * fd.io coding-style-patch-verification: ON *