ioloop-internal.h revision 1388b590dbd85245b591346f860bc1319953318a
#ifndef IOLOOP_INTERNAL_H
#define IOLOOP_INTERNAL_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;
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 msecs;
void *context;
struct ioloop_context *ctx;
};
struct ioloop_context_callback {
void *context;
};
struct ioloop_context {
int refcount;
};
/* I/O handler calls */
#endif