ELinks 0.18.0
select.h File Reference
#include "main/timer.h"
Include dependency graph for select.h:

Macros

#define EINTRLOOPX(ret_, call_, x_)
#define EINTRLOOP(ret_, call_)
#define register_bottom_half(fn, data)
#define clear_handlers(fd)

Typedefs

typedef void(* select_handler_T) (void *)

Enumerations

enum  select_handler_type { SELECT_HANDLER_READ , SELECT_HANDLER_WRITE , SELECT_HANDLER_ERROR }

Functions

void select_loop (void(*init)(void))
int get_file_handles_count (void)
int register_bottom_half_do (select_handler_T work_handler, void *data)
void check_bottom_halves (void)
select_handler_T get_handler (int fd, enum select_handler_type type)
void * get_handler_data (int fd)
void set_handlers (int fd, select_handler_T read_handler, select_handler_T write_handler, select_handler_T error_handler, void *data)
int can_read (int fd)
int can_write (int fd)
void terminate_select (void)
const char * get_libevent_version (void)

Variables

pid_t signal_pid
int signal_pipe [2]

Macro Definition Documentation

◆ clear_handlers

#define clear_handlers ( fd)
Value:
#define NULL
Definition explodename.c:35
void set_handlers(int fd, select_handler_T read_func, select_handler_T write_func, select_handler_T error_func, void *data)
Definition select.c:972

◆ EINTRLOOP

#define EINTRLOOP ( ret_,
call_ )
Value:
EINTRLOOPX(ret_, call_, -1)
#define EINTRLOOPX(ret_, call_, x_)
Definition select.h:34

◆ EINTRLOOPX

#define EINTRLOOPX ( ret_,
call_,
x_ )
Value:
do { \
(ret_) = (call_); \
} while ((ret_) == (x_) && errno == EINTR)
int errno

◆ register_bottom_half

#define register_bottom_half ( fn,
data )
Value:
register_bottom_half_do((select_handler_T) (fn), (void *) (data))
int register_bottom_half_do(select_handler_T fn, void *data)
Definition select.c:725
void(* select_handler_T)(void *)
Definition select.h:102

Typedef Documentation

◆ select_handler_T

typedef void(* select_handler_T) (void *)

Enumeration Type Documentation

◆ select_handler_type

Enumerator
SELECT_HANDLER_READ 
SELECT_HANDLER_WRITE 
SELECT_HANDLER_ERROR 

Function Documentation

◆ can_read()

int can_read ( int fd)

◆ can_write()

int can_write ( int fd)

◆ check_bottom_halves()

void check_bottom_halves ( void )

◆ get_file_handles_count()

int get_file_handles_count ( void )

◆ get_handler()

select_handler_T get_handler ( int fd,
enum select_handler_type type )

◆ get_handler_data()

void * get_handler_data ( int fd)

◆ get_libevent_version()

const char * get_libevent_version ( void )

◆ register_bottom_half_do()

int register_bottom_half_do ( select_handler_T work_handler,
void * data )

◆ select_loop()

void select_loop ( void(* init )(void))

◆ set_handlers()

void set_handlers ( int fd,
select_handler_T read_handler,
select_handler_T write_handler,
select_handler_T error_handler,
void * data )

◆ terminate_select()

void terminate_select ( void )

Variable Documentation

◆ signal_pid

pid_t signal_pid
extern

◆ signal_pipe

int signal_pipe[2]
extern