#include <vpp-api/vapi/vapi.h>
#include <vpp-api/vapi/vapi_internal.h>
#include <vppinfra/types.h>
#include <vpp-api/vapi/vapi.h>
#include <vpp-api/vapi/vapi_internal.h>
#include <vppinfra/types.h>
/* we need to use control pings for some stuff and because we're forced to put
* the code in headers, we need a way to be able to grab the ids of these
/* we need to use control pings for some stuff and because we're forced to put
* the code in headers, we need a way to be able to grab the ids of these
vapi_message_desc_t *m = __vapi_metadata.msgs[i];
u8 scratch[m->name_with_crc_len + 1];
memcpy (scratch, m->name_with_crc, m->name_with_crc_len + 1);
vapi_message_desc_t *m = __vapi_metadata.msgs[i];
u8 scratch[m->name_with_crc_len + 1];
memcpy (scratch, m->name_with_crc, m->name_with_crc_len + 1);
- tmp = unix_shared_memory_queue_add (q, (u8 *) & msg,
- VAPI_MODE_BLOCKING ==
- ctx->mode ? 0 : 1);
+ tmp = svm_queue_add (q, (u8 *) & msg,
+ VAPI_MODE_BLOCKING == ctx->mode ? 0 : 1);
}
VAPI_DBG ("send two: %u[%s], %u[%s]", msgid1, name1, msgid2, name2);
#endif
}
VAPI_DBG ("send two: %u[%s], %u[%s]", msgid1, name1, msgid2, name2);
#endif
- int tmp = unix_shared_memory_queue_add2 (q, (u8 *) & msg1, (u8 *) & msg2,
- VAPI_MODE_BLOCKING ==
- ctx->mode ? 0 : 1);
+ int tmp = svm_queue_add2 (q, (u8 *) & msg1, (u8 *) & msg2,
+ VAPI_MODE_BLOCKING == ctx->mode ? 0 : 1);
-vapi_recv (vapi_ctx_t ctx, void **msg, size_t * msg_size)
+vapi_recv (vapi_ctx_t ctx, void **msg, size_t * msg_size,
+ svm_q_conditional_wait_t cond, u32 time)
- int tmp = unix_shared_memory_queue_sub (q, (u8 *) & data, 0);
+
+ int tmp = svm_queue_sub (q, (u8 *) & data, cond, time);
+
- vapi_error_e rv = vapi_recv (ctx, &msg, &size);
+ vapi_error_e rv = vapi_recv (ctx, &msg, &size, SVM_Q_WAIT, 0);