ELinks 0.18.0
select.c File Reference
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <sys/types.h>
#include "elinks.h"
#include "intl/libintl.h"
#include "main/main.h"
#include "main/select.h"
#include "main/timer.h"
#include "osdep/osdep.h"
#include "osdep/signals.h"
#include "session/download.h"
#include "terminal/terminal.h"
#include "util/error.h"
#include "util/memcount.h"
#include "util/memory.h"
#include "util/time.h"
Include dependency graph for select.c:

Data Structures

struct  thread
 
struct  bottom_half
 

Macros

#define FD_SETSIZE   1024
 
#define __STRING(x)   #x
 

Functions

const char * get_libevent_version (void)
 
int get_file_handles_count (void)
 
int register_bottom_half_do (select_handler_T fn, void *data)
 
void check_bottom_halves (void)
 
select_handler_T get_handler (int fd, enum select_handler_type tp)
 
void * get_handler_data (int fd)
 
void set_handlers (int fd, select_handler_T read_func, select_handler_T write_func, select_handler_T error_func, void *data)
 
static void periodic_redraw_all_terminals (void *data)
 
static void try_redraw_all_terminals (void)
 
static void clear_events (int h, int blocking)
 
static void clear_events_ptr (void *handle)
 
void select_loop (void(*init)(void))
 
static int can_read_or_write (int fd, int write)
 
int can_read (int fd)
 
int can_write (int fd)
 
void terminate_select (void)
 

Variables

static int n_threads = 0
 
static struct threadthreads = NULL
 
static fd_set w_read
 
static fd_set w_write
 
static fd_set w_error
 
static fd_set x_read
 
static fd_set x_write
 
static fd_set x_error
 
static int w_max
 
static struct bottom_half list bottom_halves = { D_LIST_HEAD_EL(bottom_halves) }
 
static timer_id_T periodic_redraw_timer = TIMER_ID_UNDEF
 
static int was_installed_timer = 0
 
pid_t signal_pid
 
int signal_pipe [2] = { -1, -1 }
 

Macro Definition Documentation

◆ __STRING

#define __STRING ( x)    #x

◆ FD_SETSIZE

#define FD_SETSIZE   1024

Function Documentation

◆ can_read()

int can_read ( int fd)

◆ can_read_or_write()

static int can_read_or_write ( int fd,
int write )
static

◆ can_write()

int can_write ( int fd)

◆ check_bottom_halves()

void check_bottom_halves ( void )

◆ clear_events()

static void clear_events ( int h,
int blocking )
static

◆ clear_events_ptr()

static void clear_events_ptr ( void * handle)
static

◆ get_file_handles_count()

int get_file_handles_count ( void )

◆ get_handler()

select_handler_T get_handler ( int fd,
enum select_handler_type tp )

◆ get_handler_data()

void * get_handler_data ( int fd)

◆ get_libevent_version()

const char * get_libevent_version ( void )

◆ periodic_redraw_all_terminals()

static void periodic_redraw_all_terminals ( void * data)
static

◆ register_bottom_half_do()

int register_bottom_half_do ( select_handler_T fn,
void * data )

◆ select_loop()

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

◆ set_handlers()

void set_handlers ( int fd,
select_handler_T read_func,
select_handler_T write_func,
select_handler_T error_func,
void * data )

◆ terminate_select()

void terminate_select ( void )

◆ try_redraw_all_terminals()

static void try_redraw_all_terminals ( void )
static

Variable Documentation

◆ bottom_halves

struct bottom_half list bottom_halves = { D_LIST_HEAD_EL(bottom_halves) }
static

◆ n_threads

int n_threads = 0
static

◆ periodic_redraw_timer

timer_id_T periodic_redraw_timer = TIMER_ID_UNDEF
static

◆ signal_pid

pid_t signal_pid

◆ signal_pipe

int signal_pipe[2] = { -1, -1 }

◆ threads

struct thread* threads = NULL
static

◆ w_error

fd_set w_error
static

◆ w_max

int w_max
static

◆ w_read

fd_set w_read
static

◆ w_write

fd_set w_write
static

◆ was_installed_timer

int was_installed_timer = 0
static

◆ x_error

fd_set x_error
static

◆ x_read

fd_set x_read
static

◆ x_write

fd_set x_write
static