OpenMPI  0.1.1
eventop Struct Reference

Structure to define the backend of a given event_base. More...

#include <event-internal.h>

Data Fields

const char * name
 The name of this backend. More...
 
void *(* init )(struct event_base *)
 Function to set up an event_base to use this backend. More...
 
int(* add )(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo)
 Enable reading/writing on a given fd or signal. More...
 
int(* del )(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo)
 As "add", except 'events' contains the events we mean to disable. More...
 
int(* dispatch )(struct event_base *, struct timeval *)
 Function to implement the core of an event loop. More...
 
void(* dealloc )(struct event_base *)
 Function to clean up and free our data from the event_base. More...
 
int need_reinit
 Flag: set if we need to reinitialize the event base after we fork.
 
enum event_method_feature features
 Bit-array of supported event_method_features that this backend can provide. More...
 
size_t fdinfo_len
 Length of the extra information we should record for each fd that has one or more active events. More...
 

Detailed Description

Structure to define the backend of a given event_base.

Field Documentation

int(* eventop::add)(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo)

Enable reading/writing on a given fd or signal.

'events' will be the events that we're trying to enable: one or more of EV_READ, EV_WRITE, EV_SIGNAL, and EV_ET. 'old' will be those events that were enabled on this fd previously. 'fdinfo' will be a structure associated with the fd by the evmap; its size is defined by the fdinfo field below. It will be set to 0 the first time the fd is added. The function should return 0 on success and -1 on error.

Referenced by evmap_io_add().

void(* eventop::dealloc)(struct event_base *)

Function to clean up and free our data from the event_base.

Referenced by event_base_free(), and event_reinit().

int(* eventop::del)(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo)

As "add", except 'events' contains the events we mean to disable.

Referenced by evmap_io_del().

int(* eventop::dispatch)(struct event_base *, struct timeval *)

Function to implement the core of an event loop.

It must see which added events are ready, and cause event_active to be called for each active event (usually via event_io_active or such). It should return 0 on success and -1 on error.

Referenced by event_base_loop().

size_t eventop::fdinfo_len

Length of the extra information we should record for each fd that has one or more active events.

This information is recorded as part of the evmap entry for each fd, and passed as an argument to the add and del functions above.

Referenced by evmap_io_add().

enum event_method_feature eventop::features

Bit-array of supported event_method_features that this backend can provide.

Referenced by event_base_get_features(), and evthread_make_base_notifiable().

void*(* eventop::init)(struct event_base *)

Function to set up an event_base to use this backend.

It should create a new structure holding whatever information is needed to run the backend, and return it. The returned pointer will get stored by event_init into the event_base.evbase field. On failure, this function should return NULL.

Referenced by event_base_new_with_config(), and event_reinit().

const char* eventop::name

The documentation for this struct was generated from the following file: