pazpar2
1.14.1
|
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | iochan |
Macros | |
#define | EVENT_INPUT 0x01 |
#define | EVENT_OUTPUT 0x02 |
#define | EVENT_EXCEPT 0x04 |
#define | EVENT_TIMEOUT 0x08 |
#define | iochan_getfd(i) ((i)->fd) |
#define | iochan_setfd(i, d) ((i)->fd = d) |
#define | iochan_getdata(i) ((i)->data) |
#define | iochan_setdata(i, d) ((i)->data = d) |
#define | iochan_setflags(i, d) ((i)->flags = d) |
#define | iochan_setflag(i, d) ((i)->flags |= d) |
#define | iochan_clearflag(i, d) ((i)->flags &= ~(d)) |
#define | iochan_getflag(i, d) ((i)->flags & d ? 1 : 0) |
#define | iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0)) |
#define | iochan_activity(i) ((i)->last_event = time(0)) |
Typedefs | |
typedef void(* | IOC_CALLBACK) (struct iochan *i, int event) |
typedef struct iochan_man_s * | iochan_man_t |
typedef struct iochan * | IOCHAN |
Functions | |
iochan_man_t | iochan_man_create (int no_threads, int max_sockets) |
int | iochan_add (iochan_man_t man, IOCHAN chan, int slack) |
void | iochan_man_events (iochan_man_t man) |
void | iochan_man_destroy (iochan_man_t *mp) |
void | iochan_destroy (IOCHAN chan) |
IOCHAN | iochan_create (int fd, IOC_CALLBACK cb, int flags, const char *name) |
#define iochan_settimeout | ( | i, | |
t | |||
) | ((i)->max_idle = (t), (i)->last_event = time(0)) |
typedef struct iochan_man_s* iochan_man_t |
int iochan_add | ( | iochan_man_t | man, |
IOCHAN | chan, | ||
int | slack | ||
) |
Definition at line 173 of file eventl.c.
References iochan_man_s::channel_list, iochan::fd, iochan_man_s::iochan_mutex, iochan_man_s::limit_fd, iochan_man_s::log_level, iochan::man, and iochan::next.
Referenced by connection_connect(), http_accept(), http_init(), http_proxy(), http_session_create(), and test_for_real_work().
IOCHAN iochan_create | ( | int | fd, |
IOC_CALLBACK | cb, | ||
int | flags, | ||
const char * | name | ||
) |
Definition at line 209 of file eventl.c.
References iochan::destroyed, iochan::fd, iochan::flags, iochan::fun, iochan_use(), iochan::last_event, iochan::man, iochan::max_idle, iochan::name, name, iochan::next, and iochan::thread_users.
Referenced by connection_connect(), http_accept(), http_init(), http_proxy(), http_session_create(), and test_for_real_work().
void iochan_destroy | ( | IOCHAN | chan | ) |
Definition at line 201 of file eventl.c.
References iochan::destroyed, iochan_destroy_real(), and iochan::man.
Referenced by connection_connect(), connection_destroy(), http_channel_destroy(), http_init(), http_proxy(), http_session_destroy(), http_sessions_destroy(), iochan_handler(), and proxy_io().
iochan_man_t iochan_man_create | ( | int | no_threads, |
int | max_sockets | ||
) |
Definition at line 113 of file eventl.c.
References iochan_man_s::channel_list, iochan_man_s::fds, iochan_man_s::iochan_mutex, iochan_man_s::limit_fd, iochan_man_s::log_level, iochan_man_s::no_threads, iochan_man_s::sel_fd, iochan_man_s::sel_thread, and iochan_man_s::size_fds.
Referenced by config_start_listeners(), and test_for_real_work().
void iochan_man_destroy | ( | iochan_man_t * | mp | ) |
Definition at line 152 of file eventl.c.
References iochan_destroy_real(), and sel_thread_destroy().
Referenced by config_destroy(), and test_for_real_work().
void iochan_man_events | ( | iochan_man_t | man | ) |
Definition at line 433 of file eventl.c.
References iochan_man_s::channel_list, event_loop(), iochan_man_s::log_level, iochan_man_s::no_threads, iochan_man_s::sel_fd, iochan_man_s::sel_thread, sel_thread_create(), and work_handler().
Referenced by config_process_events(), and test_for_real_work().