Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Event engines.


Detailed Description

Event engines.


Files

file  engines.h
 Event system engine header file.

Data Structures

struct  _ev_englink_s
 Engine link helper structure. More...
struct  _ev_sockets_s
 Engine sockets helper structure. More...
struct  _ev_signals_s
 Engine signals helper structure. More...
struct  _ev_timers_s
 Engine timers helper structure. More...
struct  _ev_engine_s
 Event engine structure. More...

Defines

#define ENGINE_MODULE
 Engine module name.
#define _ev__p(l, r)
 Paste arguments.
#define _ev_paste(l, r)
 Paste arguments with macro expansion.
#define EV_ENGINE_MAGIC
 Event engine magic number.
#define EV_ENGINE_INIT(name, desc, flags, init, poll, fini, so_add, so_rem,so_ev, si_add, si_rem, ti_add, ti_rem)
 Event engine initialization.
#define EV_ENGINE_SOCKET
 Socket engine flag.
#define EV_ENGINE_SIGNAL
 Signal engine flag.
#define EV_ENGINE_TIMER
 Timer engine flag.
#define EV_ENGINE_COMPMASK
 Engine components mask.
#define EV_ENGINE_REGISTERED
 Engine registered flag.
#define EV_ENGINE_RUNNING
 Engine running flag.
#define eng_verify(eng)
 Event engine verification macro.
#define eng_name(eng)
 Event engine name.
#define eng_desc(eng)
 Event engine description.
#define eng_flags(eng)
 Event engine flags.
#define eng_runfl(eng)
 Event running engine flags.
#define eng_runfl_set(eng, fl)
 Set event engine run flag.
#define eng_runfl_clr(eng, fl)
 Clear event engine run flag.
#define eng_data(eng)
 Engine-specific data.
#define eng_data_set(eng, data)
 Set engine-specific data.
#define eng_sockdata(eng)
 Socket-specific data.
#define eng_sockdata_set(eng, data)
 Set socket-specific data.
#define eng_sigdata(eng)
 Signal-specific data.
#define eng_sigdata_set(eng, data)
 Set signal-specific data.
#define eng_timdata(eng)
 Timer-specific data.
#define eng_timdata_set(eng, data)
 Set timer-specific data.
#define so_eevents_set(sock, flags)
 Set engine socket event flags.
#define so_eevents_clr(sock, flags)
 Clear engine socket event flags.

Typedefs

typedef _ev_engine_s ev_engine_t
 Event engine.
typedef _ev_englink_s _ev_englink_t
 Engine link helper.
typedef _ev_sockets_s _ev_sockets_t
 Engine sockets helper.
typedef _ev_signals_s _ev_signals_t
 Engine signals helper.
typedef _ev_timers_s _ev_timers_t
 Engine timers helper.
typedef ev_engine_t *(* ev_modinit_t )(ev_ctx_t *ctx)
 Initialize engine module.
typedef ev_err_t(* ev_init_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_flags_t *eng_flags)
 Initialize event engine.
typedef ev_err_t(* ev_poll_t )(ev_ctx_t *ctx, ev_engine_t *engine, struct timeval *timeout)
 Poll engine events.
typedef void(* ev_fini_t )(ev_ctx_t *ctx, ev_engine_t *engine)
 Finalize event engine.
typedef ev_err_t(* ev_sockadd_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock)
 Add a socket to an event engine.
typedef ev_err_t(* ev_sockrem_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock)
 Remove a socket from an event engine.
typedef ev_err_t(* ev_sockev_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock, ev_flags_t evs)
 Change event interest set on a socket.
typedef ev_err_t(* ev_sigadd_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig)
 Add a signal to an event engine.
typedef ev_err_t(* ev_sigrem_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig)
 Remove a signal from an event engine.
typedef ev_err_t(* ev_timadd_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim)
 Add a timer to an event engine.
typedef ev_err_t(* ev_timrem_t )(ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim)
 Remove a timer from an event engine.

Functions

ev_engine_tengine_mod_init (ev_ctx_t *ctx)
 Engine module initialization function.
ev_err_t engine_register (ev_ctx_t *ctx, ev_engine_t *engine)
 Register an engine.
ev_err_t engine_activate (ev_ctx_t *ctx, ev_engine_t *engine, ev_flags_t comps)
 Activate an engine.
ev_err_t event_attr_engine (ev_attr_t *attr, ev_engine_t *engine)
 Register an application-specific engine.

Variables

ev_engine_tengine_module
 Engine module descriptor.


Define Documentation

#define _ev__p l,
 ) 
 

For internal use only.

This macro causes its arguments to be pasted together.

Parameters:
[in] l The left side of the paste operation.
[in] r The right side of the paste operation.

Definition at line 68 of file engines.h.

#define _ev_paste l,
 ) 
 

For internal use only.

This macro causes its arguments to be macro expanded, then pasted together by use of _ev__p().

Parameters:
[in] l The left side of the paste operation.
[in] r The right side of the paste operation.

Definition at line 80 of file engines.h.

#define eng_data eng   ) 
 

This macro retrieves the engine-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
A pointer to void specifying the engine-specific data for the given engine.

Definition at line 628 of file engines.h.

Referenced by main().

#define eng_data_set eng,
data   ) 
 

This macro sets the engine-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] data A pointer to void specifying the engine-specific data for the given engine.

Definition at line 639 of file engines.h.

Referenced by ei_init().

#define eng_desc eng   ) 
 

This macro retrieves the engine description for the ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
The description of the ev_engine_t.

Definition at line 576 of file engines.h.

#define eng_flags eng   ) 
 

This macro retrieves the engine flags for the ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
The engine flags of the ev_engine_t.

Definition at line 586 of file engines.h.

#define eng_name eng   ) 
 

This macro retrieves the engine name for the ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
The name of the ev_engine_t.

Definition at line 566 of file engines.h.

Referenced by main().

#define eng_runfl eng   ) 
 

This macro retrieves the run flags for a running engine's ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
The run flags of the ev_engine_t.

Definition at line 597 of file engines.h.

#define eng_runfl_clr eng,
fl   ) 
 

This macro clears a specific (or a set of specific) run flags on the given ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] fl A set of run flags to clear.

Definition at line 617 of file engines.h.

#define eng_runfl_set eng,
fl   ) 
 

This macro sets a specific (or a set of specific) run flags on the given ev_engine_t.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] fl A set of run flags to set.

Definition at line 607 of file engines.h.

Referenced by engine_activate().

#define eng_sigdata eng   ) 
 

This macro retrieves the signal-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
A pointer to void specifying the signal-specific data for the given engine.

Definition at line 673 of file engines.h.

#define eng_sigdata_set eng,
data   ) 
 

This macro sets the signal-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] data A pointer to void specifying the signal-specific data for the given engine.

Definition at line 684 of file engines.h.

#define eng_sockdata eng   ) 
 

This macro retrieves the socket-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
A pointer to void specifying the socket-specific data for the given engine.

Definition at line 650 of file engines.h.

#define eng_sockdata_set eng,
data   ) 
 

This macro sets the socket-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] data A pointer to void specifying the socket-specific data for the given engine.

Definition at line 661 of file engines.h.

#define eng_timdata eng   ) 
 

This macro retrieves the timer-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
A pointer to void specifying the timer-specific data for the given engine.

Definition at line 696 of file engines.h.

#define eng_timdata_set eng,
data   ) 
 

This macro sets the timer-specific data for the given engine.

Parameters:
[in] eng A pointer to an ev_engine_t.
[in] data A pointer to void specifying the timer-specific data for the given engine.

Definition at line 707 of file engines.h.

#define eng_verify eng   ) 
 

This macro verifies that a given pointer actually does point to an ev_engine_t.

Warning:
This macro evaluates the eng argument twice.
Parameters:
[in] eng A pointer to an ev_engine_t.
Returns:
Boolean true if ctx is a valid event engine or false otherwise.

Definition at line 556 of file engines.h.

Referenced by engine_activate(), engine_register(), and event_attr_engine().

#define ENGINE_MODULE
 

All engines built as modules must define this macro to contain the name of the engine prior to the definition of engine_mod_init() or engine_module. Note that this name must be a valid C symbol.

Definition at line 56 of file engines.h.

#define EV_ENGINE_COMPMASK
 

This mask is simply a bit-wise OR of EV_ENGINE_SOCKET, EV_ENGINE_SIGNAL, and EV_ENGINE_TIMER, used to extract only the engine components from the run flags (or wherever).

Definition at line 527 of file engines.h.

Referenced by engine_activate(), engine_load(), and event_init().

#define EV_ENGINE_INIT name,
desc,
flags,
init,
poll,
fini,
so_add,
so_rem,
so_ev,
si_add,
si_rem,
ti_add,
ti_rem   ) 
 

This macro is used to initialize an ev_engine_t.

Parameters:
[in] name Engine name.
[in] desc Optional text description of the engine.
[in] flags A bit-wise OR of EV_ENGINE_SOCKET, EV_ENGINE_SIGNAL, and EV_ENGINE_TIMER to indicate which components the engine supports.
[in] init A function pointer compatible with the ev_init_t type. This method is responsible for initializing the event engine.
[in] poll A function pointer compatible with the ev_poll_t type. This method is responsible for polling for events that have occurred.
[in] fini A function pointer compatible with the ev_fini_t type. This method is responsible for cleaning up the engine. This is an optional method.
[in] so_add A function pointer compatible with the ev_sockadd_t type. This method is called to register a socket with the event engine.
[in] so_rem A function pointer compatible with the ev_sockrem_t type. This method is called to remove a socket from the event engine.
[in] so_ev A function pointer compatible with the ev_sockev_t type. This method is called to change the set of events the application is interested in for a particular socket.
[in] si_add A function pointer compatible with the ev_sigadd_t type. This method is called to register a signal with the event engine.
[in] si_rem A function pointer compatible with the ev_sigrem_t type. This method is called to remove a signal from the event engine.
[in] ti_add A function pointer compatible with the ev_timadd_t type. This method is called to register a timer with the event engine.
[in] ti_rem A function pointer compatible with the ev_timrem_t type. This method is called to remove a timer from the event engine.

Definition at line 484 of file engines.h.

#define EV_ENGINE_MAGIC
 

This is the magic number used for the event engine structure.

Definition at line 424 of file engines.h.

#define EV_ENGINE_REGISTERED
 

This flag is used to mark the engine as having already been registered with the events library.

Definition at line 535 of file engines.h.

Referenced by engine_activate(), engine_load(), engine_register(), and event_attr_engine().

#define EV_ENGINE_RUNNING
 

This flag is used to indicate that the engine has been initialized by the events library and is running.

Definition at line 542 of file engines.h.

Referenced by engine_activate(), engine_load(), and event_destroy().

#define EV_ENGINE_SIGNAL
 

This flag is used to inform the events library that the engine can handle signals. It is also used by the library, in the call to the engine initialization method, to request that the engine initialize its signal interface--and returned by that method to indicate which engines were initialized.

Definition at line 509 of file engines.h.

Referenced by engine_activate(), engine_load(), engine_register(), and event_attr_engine().

#define EV_ENGINE_SOCKET
 

This flag is used to inform the events library that the engine can handle sockets. It is also used by the library, in the call to the engine initialization method, to request that the engine initialize its socket interface--and returned by that method to indicate which engines were initialized.

Definition at line 499 of file engines.h.

Referenced by engine_activate(), engine_load(), engine_register(), and event_attr_engine().

#define EV_ENGINE_TIMER
 

This flag is used to inform the events library that the engine can handle timers. It is also used by the library, in the call to the engine initialization method, to request that the engine initialize its timer interface--and returned by that method to indicate which engines were initialized.

Definition at line 519 of file engines.h.

Referenced by engine_activate(), and engine_load().

#define so_eevents_clr sock,
flags   ) 
 

This macro is used to clear the engine event flags on a socket.

Parameters:
[in,out] sock A pointer to an ev_sock_t.
[in] flags The flags to clear on the socket.

Definition at line 728 of file engines.h.

#define so_eevents_set sock,
flags   ) 
 

This macro is used to set the engine event flags on a socket.

Parameters:
[in,out] sock A pointer to an ev_sock_t.
[in] flags The flags to set on the socket.

Definition at line 717 of file engines.h.


Typedef Documentation

typedef struct _ev_englink_s _ev_englink_t
 

For internal use only.

This type is a helper type for specifying a linked list of engines. It is used merely to simplify the struct _ev_engine_s structure.

Definition at line 141 of file engines.h.

typedef struct _ev_signals_s _ev_signals_t
 

For internal use only.

This type is a helper type for specifying a set of signal callback functions and ancillary data. It is used merely to simplify the struct _ev_engine_s structure.

Definition at line 159 of file engines.h.

typedef struct _ev_sockets_s _ev_sockets_t
 

For internal use only.

This type is a helper type for specifying a set of socket callback functions and ancillary data. It is used merely to simplify the struct _ev_engine_s structure.

Definition at line 150 of file engines.h.

typedef struct _ev_timers_s _ev_timers_t
 

For internal use only.

This type is a helper type for specifying a set of timer callback functions and ancillary data. It is used merely to simplify the struct _ev_engine_s structure.

Definition at line 168 of file engines.h.

typedef struct _ev_engine_s ev_engine_t
 

The event engine structure describes an event engine. Each engine must declare and initialize an ev_engine_t and register it with engine_register().

Definition at line 133 of file engines.h.

typedef void(* ev_fini_t)(ev_ctx_t *ctx, ev_engine_t *engine)
 

This type describes an engine callback method for finalizing the event engine. Any engine allocating system resources SHOULD implement this method to do any necessary clean-up.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.

Definition at line 235 of file engines.h.

typedef ev_err_t(* ev_init_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_flags_t *eng_flags)
 

This type describes an engine callback method for initializing the event engine. All engines MUST implement this method. This method should make calls to engine_activate().

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in,out] eng_flags A pointer to an ev_flags_t containing the desired engine flags. This is a value-result parameter that the engine is expected to modify.
Returns:
A non-zero error code, or 0 on success.

Definition at line 205 of file engines.h.

typedef ev_engine_t*(* ev_modinit_t)(ev_ctx_t *ctx)
 

This type describes a callback function used to initialize an engine module loaded by event_init(). The callback function MUST make a call to engine_register() and MUST return an ev_engine_t for event_init() to initialize.

Note:
If a loadable module does not implement a function of this type named engine_mod_init(), it MUST implement an ev_engine_t named engine_module; otherwise, event_init() will not be able to load the module.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
Returns:
A pointer to the ev_engine_t which will be initialized by event_init().

Definition at line 187 of file engines.h.

typedef ev_err_t(* ev_poll_t)(ev_ctx_t *ctx, ev_engine_t *engine, struct timeval *timeout)
 

This type describes an engine callback method for polling for events by the engine. All engines MUST implement this method. This method should make calls to event_generate().

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in,out] timeout A pointer to a struct timeval which will contain the current timeout value. This is a value-result parameter that the engine may modify.
Returns:
A non-zero error code, or 0 on success.

Definition at line 223 of file engines.h.

typedef ev_err_t(* ev_sigadd_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig)
 

This type describes an engine callback method for registering a signal with the event engine. Any engine implementing signal events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] sig A pointer to an ev_sig_t specifying the signal being registered.
Returns:
A non-zero error code, or 0 on success.

Definition at line 300 of file engines.h.

typedef ev_err_t(* ev_sigrem_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig)
 

This type describes an engine callback method for unregistering a signal from the event engine. Any engine implementing signal events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] sig A pointer to an ev_sig_t specifying the signal being removed.
Returns:
A non-zero error code, or 0 on success.

Definition at line 316 of file engines.h.

typedef ev_err_t(* ev_sockadd_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock)
 

This type describes an engine callback method for registering a socket with the event engine. Any engine implementing socket events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] sock A pointer to an ev_sock_t specifying the socket being registered.
Returns:
A non-zero error code, or 0 on success.

Definition at line 250 of file engines.h.

typedef ev_err_t(* ev_sockev_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock, ev_flags_t evs)
 

This type describes an engine callback method for changing the interest set on a socket. Any engine implementing socket events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] sock A pointer to an ev_sock_t specifying the socket being manipulated.
[in] evs An ev_flags_t specifying the events of interest.
Returns:
A non-zero error code, or 0 on success.

Definition at line 284 of file engines.h.

typedef ev_err_t(* ev_sockrem_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock)
 

This type describes an engine callback method for unregistering a socket from the event engine. Any engine implementing socket events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] sock A pointer to an ev_sock_t specifying the socket being removed.
Returns:
A non-zero error code, or 0 on success.

Definition at line 266 of file engines.h.

typedef ev_err_t(* ev_timadd_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim)
 

This type describes an engine callback method for registering a timer with the event engine. Any engine implementing timer events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] tim A pointer to an ev_tim_t specifying the timer being registered.
Returns:
A non-zero error code, or 0 on success.

Definition at line 332 of file engines.h.

typedef ev_err_t(* ev_timrem_t)(ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim)
 

This type describes an engine callback method for unregistering a timer from the event engine. Any engine implementing timer events MUST implement this method.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to the ev_engine_t.
[in] tim A pointer to an ev_tim_t specifying the timer being removed.
Returns:
A non-zero error code, or 0 on success.

Definition at line 348 of file engines.h.


Function Documentation

ev_err_t engine_activate ev_ctx_t ctx,
ev_engine_t engine,
ev_flags_t  comps
 

This function is used to activate an engine for the given engine component.

Test:
This function is tested in t_event_init.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to an ev_engine_t representing the engine to be activated.
[in] comps A bit-wise OR of EV_ENGINE_SOCKET, EV_ENGINE_SIGNAL, and EV_ENGINE_TIMER to indicate which components the engine is to be activated for.
Return values:
EINVAL An invalid argument was given.

Definition at line 64 of file engine_activate.c.

References ec_verify, eng_link, _ev_engine_s::eng_runfl, eng_runfl_set, eng_verify, EV_ENGINE_COMPMASK, EV_ENGINE_REGISTERED, EV_ENGINE_RUNNING, EV_ENGINE_SIGNAL, EV_ENGINE_SOCKET, EV_ENGINE_TIMER, ev_init, and ev_return.

Referenced by em_init(), and emi_init().

ev_engine_t* engine_mod_init ev_ctx_t ctx  ) 
 

This function, if defined by an engine module, will be called upon module load by event_init(). It may perform any initialization tasks that must be done prior to the call to the engine's initialization method. It MUST make a call to engine_register() AND return a pointer to the registered ev_engine_t.

Note:
One of engine_mod_init() or engine_module MUST be declared by ALL loadable engine modules. Also note that ENGINE_MODULE MUST be defined prior to any reference to engine_mod_init().
Parameters:
[in] ctx A pointer to an ev_ctx_t.
Returns:
A pointer to the ev_engine_t which will be initialized by event_init().

Definition at line 169 of file engmodinit.c.

References engine_register().

Here is the call graph for this function:

ev_err_t engine_register ev_ctx_t ctx,
ev_engine_t engine
 

This is used to register an engine descriptor with the library. It is expected that this function will be called by dynamically loadable modules from their module initialization routine.

Test:
This function is tested in t_event_init.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] engine A pointer to an ev_engine_t representing the engine to be registered.
Return values:
EINVAL An invalid argument was given.
EBUSY Engine already registered.
EEXIST Engine name conflict.

Definition at line 34 of file engine_register.c.

References _ev_ctx_s::ec_engine, ec_verify, _ev_englink_s::el_next, _ev_englink_s::el_prev, _ev_engine_s::eng_data, _ev_engine_s::eng_flags, _ev_engine_s::eng_init, _ev_engine_s::eng_list, _ev_engine_s::eng_name, _ev_engine_s::eng_poll, _ev_engine_s::eng_runfl, _ev_engine_s::eng_signal, _ev_engine_s::eng_socket, _ev_engine_s::eng_timer, eng_verify, englink_clr, _ev_signals_s::esi_active, _ev_signals_s::esi_add, _ev_signals_s::esi_data, _ev_signals_s::esi_rem, _ev_sockets_s::eso_active, _ev_sockets_s::eso_add, _ev_sockets_s::eso_data, _ev_sockets_s::eso_ev, _ev_sockets_s::eso_rem, _ev_timers_s::eti_active, _ev_timers_s::eti_data, EV_ENGINE_REGISTERED, EV_ENGINE_SIGNAL, EV_ENGINE_SOCKET, ev_init, and ev_return.

Referenced by engine_load(), engine_mod_init(), and event_init().

ev_err_t event_attr_engine ev_attr_t attr,
ev_engine_t engine
 

Engines must be registered with the library during the event_init() call. This function allows the application to specify a list of application-specific engines to be attached to the attributes object, so that applications may provide their own engines.

Test:
This function is tested in t_event_init.c.
Parameters:
[in] attr A pointer to an ev_attr_t.
[in] engine A pointer to an ev_engine_t representing the application-specific engine to be registered.
Return values:
EINVAL An invalid argument was given.
EBUSY Engine already registered.
EEXIST Engine name conflict.

Definition at line 35 of file event_attr_engine.c.

References ea_engines, ea_verify, _ev_englink_s::el_next, _ev_englink_s::el_prev, _ev_engine_s::eng_flags, _ev_engine_s::eng_init, _ev_engine_s::eng_list, _ev_engine_s::eng_name, _ev_engine_s::eng_poll, _ev_engine_s::eng_runfl, _ev_engine_s::eng_signal, _ev_engine_s::eng_socket, eng_verify, _ev_signals_s::esi_add, _ev_signals_s::esi_rem, _ev_sockets_s::eso_add, _ev_sockets_s::eso_ev, _ev_sockets_s::eso_rem, EV_ENGINE_REGISTERED, EV_ENGINE_SIGNAL, EV_ENGINE_SOCKET, ev_init, and ev_return.

Referenced by main().


Variable Documentation

ev_engine_t * engine_module
 

This variable, if defined by an engine module which does not define an engine_mod_init() function, MUST contain the engine descriptor for the engine contained within the loadable module. The event_init() function will pass this descriptor to engine_register() and will initialize the module described by it.

Note:
One of engine_mod_init() or engine_module MUST be declared by ALL loadable engine modules. Also note that ENGINE_MODULE MUST be defined prior to any reference to engine_module.

Definition at line 153 of file engmodule.c.


Generated on Wed Dec 28 23:38:04 2005 for event by  doxygen 1.4.4