static size_t len(const char *str)
int osmo_wqueue_bfd_cb(struct osmo_fd *fd, unsigned int what)
Select loop function for write queue handling.
Definition: write_queue.c:39
size_t osmo_wqueue_set_maxlen(struct osmo_wqueue *queue, unsigned int len)
Update write queue length & drop excess messages.
Definition: write_queue.c:157
int osmo_wqueue_enqueue_quiet(struct osmo_wqueue *queue, struct msgb *data)
Enqueue a new Message buffers into a write queue (without logging full queue events)
Definition: write_queue.c:107
void osmo_wqueue_clear(struct osmo_wqueue *queue)
Clear a osmo_wqueue.
Definition: write_queue.c:139
int osmo_wqueue_enqueue(struct osmo_wqueue *queue, struct msgb *data)
Enqueue a new Message buffers into a write queue.
Definition: write_queue.c:123
void osmo_wqueue_init(struct osmo_wqueue *queue, int max_length)
Initialize a osmo_wqueue structure.
Definition: write_queue.c:91
(double) linked list header structure
Definition: linuxlist.h:46
Osmocom message buffer.
Definition: msgb.h:31
Structure representing a file dsecriptor.
Definition: select.h:31
int fd
actual operating-system level file decriptor
Definition: select.h:35
write queue instance
Definition: write_queue.h:30
struct llist_head msg_queue
actual linked list implementing the queue
Definition: write_queue.h:39
unsigned int max_length
maximum length of write queue
Definition: write_queue.h:34
struct osmo_fd bfd
osmocom file descriptor
Definition: write_queue.h:32
unsigned int current_length
current length of write queue
Definition: write_queue.h:36
int(* except_cb)(struct osmo_fd *fd)
call-back in case qeueue has exceptions.
Definition: write_queue.h:46
int(* write_cb)(struct osmo_fd *fd, struct msgb *msg)
call-back in case qeueue is writable.
Definition: write_queue.h:44
int(* read_cb)(struct osmo_fd *fd)
call-back in case qeueue is readable.
Definition: write_queue.h:42