ioloop-private.h revision a23a481f9dfd5f14ebf2768b51b6fbc1cce1c864
#ifndef IOLOOP_PRIVATE_H
#define IOLOOP_PRIVATE_H
#include "priorityq.h"
#include "ioloop.h"
#ifndef IOLOOP_INITIAL_FD_COUNT
# define IOLOOP_INITIAL_FD_COUNT 128
#endif
struct ioloop {
struct ioloop_context *cur_ctx;
struct io_file *next_io_file;
struct ioloop_handler_context *handler_context;
unsigned int max_fd_count;
unsigned int running:1;
};
struct io {
enum io_condition condition;
unsigned int source_linenum;
void *context;
struct ioloop_context *ctx;
};
struct io_file {
/* use a doubly linked list so that io_remove() is quick */
int refcount;
int fd;
};
struct timeout {
struct priorityq_item item;
unsigned int source_linenum;
unsigned int msecs;
void *context;
struct ioloop_context *ctx;
};
struct ioloop_context_callback {
void *context;
};
struct ioloop_context {
int refcount;
};
/* I/O handler calls */
#endif