36 #include <ldns/ldns.h> 38 static const char* fifoq_str =
"fifo";
54 ods_log_error(
"[%s] unable to create fifoq: allocator_alloc() failed",
93 if (!q || q->
count <= 0) {
97 *worker = q->
owner[0];
98 for (i = 0; i < q->
count-1; i++) {
121 if (!q || !item || !worker) {
132 ods_log_debug(
"[%s] queue full, notify drudgers again", fifoq_str);
140 assert(worker->
task);
145 fifoq_str, q->
count);
162 cond_basic_type q_threshold;
163 cond_basic_type q_nonfull;
#define lock_basic_off(cond)
void ods_log_debug(const char *format,...)
#define lock_basic_destroy(lock)
cond_basic_type q_threshold
void * allocator_alloc(allocator_type *allocator, size_t size)
enum ods_enum_status ods_status
void ods_log_error(const char *format,...)
#define lock_basic_set(cond)
ods_status fifoq_push(fifoq_type *q, void *item, worker_type *worker, int *tries)
#define FIFOQ_TRIES_COUNT
void fifoq_cleanup(fifoq_type *q)
fifoq_type * fifoq_create(allocator_type *allocator)
void fifoq_wipe(fifoq_type *q)
void * blob[FIFOQ_MAX_COUNT]
worker_type * owner[FIFOQ_MAX_COUNT]
#define lock_basic_init(lock)
allocator_type * allocator
void ods_log_deeebug(const char *format,...)
void allocator_deallocate(allocator_type *allocator, void *data)
cond_basic_type q_nonfull
#define lock_basic_broadcast(cond)
void * fifoq_pop(fifoq_type *q, worker_type **worker)