#include "queue.h"
#include "event.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
Functions | |
struct queue * | queue_create (const char *name, int max_objects, unsigned int flags) |
void | queue_destroy (struct queue *b) |
void | queue_stats_show (int fd) |
void | queue_node_init (struct queue_node *n, int type) |
void * | queue_node_data (struct queue_node *n) |
struct queue_object * | queue_object_new (int type, size_t size) |
void | queue_object_free (struct queue_object *obj) |
int | queue_add (struct queue *b, struct queue_node *n) |
int | queue_del (struct queue_node *n) |
struct queue_node * | queue_del_head (struct queue *b) |
int | queue_in (struct queue *b, struct queue_node *n) |
int | queue_get_eventfd (struct queue *b) |
void | queue_iterate (struct queue *b, const void *data, int(*iterate)(struct queue_node *n, const void *data2)) |
unsigned int | queue_len (const struct queue *b) |
int queue_add | ( | struct queue * | b, |
struct queue_node * | n | ||
) |
References queue::enospc_err, queue::evfd, queue::head, queue_node::head, queue::max_elems, queue::num_elems, queue_node::owner, and write_evfd().
References create_evfd(), queue::evfd, queue::flags, flags, queue::head, INIT_LIST_HEAD, queue::list, queue::max_elems, queue::name, NULL, QUEUE_F_EVFD, and QUEUE_NAMELEN.
Referenced by channel_init().
int queue_del | ( | struct queue_node * | n | ) |
References queue::evfd, queue_node::head, NULL, queue::num_elems, queue_node::owner, and read_evfd().
Referenced by queue_del_head().
struct queue_node* queue_del_head | ( | struct queue * | b | ) |
References destroy_evfd(), queue::evfd, queue::flags, queue::list, and QUEUE_F_EVFD.
Referenced by channel_end().
int queue_in | ( | struct queue * | b, |
struct queue_node * | n | ||
) |
References queue_node::owner.
void queue_iterate | ( | struct queue * | b, |
const void * | data, | ||
int(*)(struct queue_node *n, const void *data2) | iterate | ||
) |
References queue::head, and list_for_each_safe.
References queue::num_elems.
void* queue_node_data | ( | struct queue_node * | n | ) |
void queue_node_init | ( | struct queue_node * | n, |
int | type | ||
) |
References queue_node::head, INIT_LIST_HEAD, queue_node::type, and type.
Referenced by queue_object_new().
void queue_object_free | ( | struct queue_object * | obj | ) |
struct queue_object* queue_object_new | ( | int | type, |
size_t | size | ||
) |
References NULL, queue_object::qnode, queue_node_init(), queue_node::size, and size.
void queue_stats_show | ( | int | fd | ) |
References buf, queue::enospc_err, queue::list, list_for_each_entry, queue::max_elems, name, queue::num_elems, and size.