pazpar2  1.6.30
Data Structures | Functions | Variables
eventl.c File Reference
#include <math.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <yaz/yconfig.h>
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/xmalloc.h>
#include <yaz/mutex.h>
#include <yaz/poll.h>
#include "eventl.h"
#include "sel_thread.h"

Go to the source code of this file.

Data Structures

struct  iochan_man_s

Functions

static int iochan_use (int delta)
int iochans_count (void)
int iochans_count_total (void)
iochan_man_t iochan_man_create (int no_threads)
IOCHAN iochan_destroy_real (IOCHAN chan)
void iochan_man_destroy (iochan_man_t *mp)
void iochan_add (iochan_man_t man, IOCHAN chan)
IOCHAN iochan_create (int fd, IOC_CALLBACK cb, int flags, const char *name)
static void work_handler (void *work_data)
static void run_fun (iochan_man_t man, IOCHAN p)
static int event_loop (iochan_man_t man, IOCHAN *iochans)
void iochan_man_events (iochan_man_t man)
void pazpar2_sleep (double d)

Variables

static YAZ_MUTEX g_mutex = 0
static int no_iochans = 0
static int no_iochans_total = 0

Function Documentation

static int event_loop ( iochan_man_t  man,
IOCHAN iochans 
)
static
void iochan_add ( iochan_man_t  man,
IOCHAN  chan 
)
IOCHAN iochan_create ( int  fd,
IOC_CALLBACK  cb,
int  flags,
const char *  name 
)
IOCHAN iochan_destroy_real ( IOCHAN  chan)

Definition at line 121 of file eventl.c.

References iochan_use(), iochan::name, and iochan::next.

Referenced by event_loop(), and iochan_man_destroy().

iochan_man_t iochan_man_create ( int  no_threads)
void iochan_man_destroy ( iochan_man_t mp)

Definition at line 131 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)
static int iochan_use ( int  delta)
static

Definition at line 66 of file eventl.c.

References g_mutex, no_iochans, and no_iochans_total.

Referenced by iochan_create(), iochan_destroy_real(), and iochans_count().

int iochans_count ( void  )

Definition at line 81 of file eventl.c.

References iochan_use().

int iochans_count_total ( void  )

Definition at line 85 of file eventl.c.

References g_mutex, and no_iochans_total.

void pazpar2_sleep ( double  d)

Definition at line 358 of file eventl.c.

static void run_fun ( iochan_man_t  man,
IOCHAN  p 
)
static
static void work_handler ( void *  work_data)
static

Variable Documentation

YAZ_MUTEX g_mutex = 0
static

Definition at line 62 of file eventl.c.

Referenced by iochan_use(), and iochans_count_total().

int no_iochans = 0
static

Definition at line 63 of file eventl.c.

Referenced by iochan_use().

int no_iochans_total = 0
static

Definition at line 64 of file eventl.c.

Referenced by iochan_use(), and iochans_count_total().