*------------------------------------------------------------------
* svm_queue.h - shared-memory queues
*
- * Copyright (c) 2009 Cisco and/or its affiliates.
+ * Copyright (c) 2009-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
typedef enum
{
- SVM_Q_WAIT = 0, /**< blocking call - must be used only in combination
- with condvars */
+ SVM_Q_WAIT = 0, /**< blocking call - best used in combination with
+ condvars, for eventfds we don't yield the cpu */
SVM_Q_NOWAIT, /**< non-blocking call - works with both condvar and
eventfd signaling */
SVM_Q_TIMEDWAIT, /**< blocking call, returns on signal or time-out -
- must be used only in combination with condvars */
+ best used in combination with condvars, with
+ eventfds we don't yield the cpu */
} svm_q_conditional_wait_t;
/**
u32 time);
int svm_queue_sub2 (svm_queue_t * q, u8 * elem);
void svm_queue_lock (svm_queue_t * q);
+void svm_queue_send_signal (svm_queue_t * q, u8 is_prod);
void svm_queue_unlock (svm_queue_t * q);
int svm_queue_is_full (svm_queue_t * q);
int svm_queue_add_nolock (svm_queue_t * q, u8 * elem);