42#define osmo_it_q_enqueue(queue, item, member) \
43 _osmo_it_q_enqueue(queue, &(item)->member)
46#define osmo_it_q_dequeue(queue, item, member) do { \
47 struct llist_head *l = _osmo_it_q_dequeue(queue); \
51 *item = llist_entry(l, typeof(**item), member); \
struct osmo_it_q * osmo_it_q_alloc(void *ctx, const char *name, unsigned int max_length, void(*read_cb)(struct osmo_it_q *q, struct llist_head *item), void *data)
struct osmo_it_q * osmo_it_q_by_name(const char *name)
void osmo_it_q_destroy(struct osmo_it_q *q)
int _osmo_it_q_enqueue(struct osmo_it_q *queue, struct llist_head *item)
void osmo_it_q_flush(struct osmo_it_q *q)
struct llist_head * _osmo_it_q_dequeue(struct osmo_it_q *queue)
Simple doubly linked list implementation.
(double) linked list header structure
Definition: linuxlist.h:46
Structure representing a file dsecriptor.
Definition: select.h:31
One instance of an inter-thread queue.
Definition: it_q.h:16
struct llist_head entry
Definition: it_q.h:18
struct osmo_fd event_ofd
Definition: it_q.h:27
void * data
Definition: it_q.h:36
unsigned int max_length
Definition: it_q.h:32
struct llist_head list
Definition: it_q.h:21
unsigned int current_length
Definition: it_q.h:25
const char * name
Definition: it_q.h:30
void(* read_cb)(struct osmo_it_q *q, struct llist_head *item)
Definition: it_q.h:34
pthread_mutex_t mutex
Definition: it_q.h:23