#ifndef IOLOOP_PRIVATE_H
#define IOLOOP_PRIVATE_H
#include "priorityq.h"
#include "ioloop.h"
#include "array-decl.h"
#ifndef IOLOOP_INITIAL_FD_COUNT
#endif
struct ioloop {
unsigned int max_fd_count;
unsigned int io_pending_count;
};
struct io {
const char *source_filename;
unsigned int source_linenum;
/* trigger I/O callback even if OS doesn't think there is input
pending */
bool pending;
void *context;
};
struct io_file {
/* use a doubly linked list so that io_remove() is quick */
int refcount;
int fd;
/* only for io_add_istream(), a bit kludgy to be here.. */
};
struct timeout {
const char *source_filename;
unsigned int source_linenum;
unsigned int msecs;
void *context;
};
struct io_wait_timer {
const char *source_filename;
unsigned int source_linenum;
};
struct ioloop_context_callback {
void *context;
bool activated;
};
struct ioloop_context {
int refcount;
};
/* I/O handler calls */
#endif