YAZ  5.23.1
Data Structures | Macros | Typedefs | Functions
eventl.h File Reference

Definitions for event loop handling for GFS. More...

#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_destroy(i)   (void)((i)->destroyed = 1)
 
#define iochan_getfd(i)   ((i)->fd)
 
#define iochan_setfd(i, f)   ((i)->fd = (f))
 
#define iochan_getdata(i)   ((i)->data)
 
#define iochan_setdata(i, d)   ((i)->data = d)
 
#define iochan_getflags(i)   ((i)->flags)
 
#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_getfun(i)   ((i)->fun)
 
#define iochan_setfun(i, d)   ((i)->fun = d)
 
#define iochan_setevent(i, e)   ((i)->force_event = (e))
 
#define iochan_getnext(i)   ((i)->next)
 
#define iochan_settimeout(i, t)   ((i)->max_idle = (t), (i)->last_event = time(0))
 

Typedefs

typedef void(* IOC_CALLBACK) (struct iochan *i, int event)
 
typedef struct iochanIOCHAN
 

Functions

IOCHAN iochan_create (int fd, IOC_CALLBACK cb, int flags, int port)
 
int iochan_is_alive (IOCHAN chan)
 
int iochan_event_loop (IOCHAN *iochans, int *watch_sig)
 
void statserv_remove (IOCHAN pIOChannel)
 

Detailed Description

Definitions for event loop handling for GFS.

This "private" header defines various functions for the main event loop in GFS.

Definition in file eventl.h.

Macro Definition Documentation

#define EVENT_EXCEPT   0x04

Definition at line 51 of file eventl.h.

Referenced by add_listener(), iochan_event_loop(), ir_session(), listener(), and xml_config_bend_stop().

#define EVENT_INPUT   0x01
#define EVENT_OUTPUT   0x02

Definition at line 50 of file eventl.h.

Referenced by iochan_event_loop(), ir_read(), ir_session(), new_session(), and process_gdu_response().

#define EVENT_TIMEOUT   0x08

Definition at line 52 of file eventl.h.

Referenced by do_close_req(), iochan_event_loop(), ir_session(), and listener().

#define iochan_clearflag (   i,
 
)    ((i)->flags &= ~(d))

Definition at line 72 of file eventl.h.

Referenced by ir_session().

#define iochan_destroy (   i)    (void)((i)->destroyed = 1)
#define iochan_getdata (   i)    ((i)->data)

Definition at line 67 of file eventl.h.

Referenced by ir_read(), ir_session(), listener(), and xml_config_bend_stop().

#define iochan_getfd (   i)    ((i)->fd)

Definition at line 65 of file eventl.h.

#define iochan_getflag (   i,
 
)    ((i)->flags & d ? 1 : 0)

Definition at line 73 of file eventl.h.

#define iochan_getflags (   i)    ((i)->flags)

Definition at line 69 of file eventl.h.

#define iochan_getfun (   i)    ((i)->fun)

Definition at line 74 of file eventl.h.

#define iochan_getnext (   i)    ((i)->next)

Definition at line 77 of file eventl.h.

Referenced by listener().

#define iochan_setdata (   i,
 
)    ((i)->data = d)

Definition at line 68 of file eventl.h.

Referenced by add_listener(), inetd_connection(), new_session(), and xml_config_bend_stop().

#define iochan_setevent (   i,
 
)    ((i)->force_event = (e))

Definition at line 76 of file eventl.h.

Referenced by do_close_req(), and ir_session().

#define iochan_setfd (   i,
 
)    ((i)->fd = (f))

Definition at line 66 of file eventl.h.

#define iochan_setflag (   i,
 
)    ((i)->flags |= d)

Definition at line 71 of file eventl.h.

Referenced by ir_read(), ir_session(), and process_gdu_response().

#define iochan_setflags (   i,
 
)    ((i)->flags = d)

Definition at line 70 of file eventl.h.

Referenced by listener(), and xml_config_bend_stop().

#define iochan_setfun (   i,
 
)    ((i)->fun = d)

Definition at line 75 of file eventl.h.

#define iochan_settimeout (   i,
 
)    ((i)->max_idle = (t), (i)->last_event = time(0))

Typedef Documentation

typedef void(* IOC_CALLBACK) (struct iochan *i, int event)

Definition at line 43 of file eventl.h.

typedef struct iochan * IOCHAN

Function Documentation

IOCHAN iochan_create ( int  fd,
IOC_CALLBACK  cb,
int  flags,
int  port 
)
int iochan_event_loop ( IOCHAN iochans,
int *  watch_sig 
)
int iochan_is_alive ( IOCHAN  chan)
void statserv_remove ( IOCHAN  pIOChannel)

Definition at line 928 of file statserv.c.

Referenced by iochan_event_loop(), and xml_config_bend_stop().