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

event_int.h File Reference


Detailed Description

For internal use only.

This file contains the structures, #define's, and function declarations used internally by the library.

Definition in file event_int.h.

#include "config.h"
#include "_stdint.h"
#include "event_err.h"
#include "event_version.h"
#include "gcc-attrs.h"
#include "event.h"
#include "sock.h"
#include "sig.h"
#include "tim.h"
#include <stdlib.h>
#include <sys/types.h>
#include <treeconf/treeconf.h>

Include dependency graph for event_int.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _ev_varlist_s
 Event attributes application variable structure. More...
struct  _ev_overvars_s
 Event attributes overridden variable list. More...
struct  _ev_attr_s
 Event attributes structure. More...
struct  _ev_genlist_s
 Event generator list structure. More...
struct  _ev_gendesc_s
 Event generator descriptor structure. More...
struct  _ev_gens_s
 Event generators structure. More...

Defines

#define __EVENT_LIBRARY__
 Library sentinel.
#define __builtin_expect(expr, expect)
 GCC optimization hint.
#define _gca_format(archetype, index, first)
 Format attribute.
#define _gca_func
 Function name.
#define _gca_have_func
 Have function name.
#define RCSTAG(tag)
 Embed RCS revision information.
#define EV_CTX_LTDLINIT
 LTDL library initialization flag.
#define EV_ATTR_MAGIC
 Event attributes magic number.
#define _ea(attr, field)
 Event attributes helper macro.
#define ea_verify(attr)
 Event attributes verification macro.
#define ea_confpath(attr)
 Event attributes configuration path.
#define ea_libpath(attr)
 Event attributes library path.
#define ea_modlist(attr)
 Event attributes module list.
#define ea_varlist(attr)
 Event attributes variable list.
#define ea_ovars(attr)
 Event attributes overridden variables.
#define ea_engines(attr)
 Event attributes engines.
#define EVAS_LOG
 Library logging enabled.
#define EVAS_ABORT
 Library aborts enabled.
#define EVAS_LOOP
 Library assertion loop flag.
#define EVAS_TRACE
 Library function call tracing.
#define ev_log(flag, msg)
 Library logging macro.
#define ev_abort()
 Library abort macro.
#define ev_assert(expr)
 Library assertion macro.
#define ev_trace()
 Function entry trace macro.
#define ev_init()
 Function initialization macro.
#define ev_return(val)
 Function return macro.
#define ev_gen_init(ctx, gen, gd)
 Initialize a generator header.
#define tv_comp(tv1, tv2)
 Compare struct timeval values.
#define tt_node_fix(tim)
 Repair timer node linking.
#define tt_node_init(tim, parent, prev)
 Initialize a timer node.
#define ti_expire_comp(tim)
 Compute timer's expiration time.
#define so_uevents_set(sock, flags)
 Set user socket event flags.
#define so_uevents_clr(sock, flags)
 Clear user socket event flags.
#define so_blocked_set(sock, flags)
 Set socket blocked flags.
#define so_blocked_clr(sock, flags)
 Clear socket blocked flags.
#define so_closed_set(sock, flags)
 Set socket closed flags.
#define so_closed_clr(sock, flags)
 Clear socket closed flags.

Typedefs

typedef _ev_varlist_s ev_varlist_t
 Event attributes application variable list.
typedef _ev_overvars_s ev_overvars_t
 Event attributes overridden variable list.
typedef _ev_attr_s _ev_attr_t
 Event attributes structure type.
typedef _ev_genlist_s ev_genlist_t
 Event generator list.
typedef _ev_gendesc_s ev_gendesc_t
 Event generator descriptor.
typedef _ev_gens_s ev_gens_t
 Event generators.

Functions

void _ev_debug (ev_flags_t flags, const char *file, int line, const char *func, const char *fmt,...)
 Log debugging messages.
ev_err_t _ev_gen_lookup (ev_ctx_t *ctx, unsigned int gentype, ev_gendesc_t **gen)
 Look up an ev_gendesc_t for a given generator.
ev_err_t _timer_insert (ev_ctx_t *ctx, ev_tim_t *tim)
 Insert a timer into the timer tree.
ev_err_t _timer_heapify_up (ev_ctx_t *ctx, ev_tim_t *tim)
 Restore timer tree heap property by shifting up.
ev_err_t _timer_heapify_down (ev_ctx_t *ctx, ev_tim_t *tim)
 Restore timer tree heap property by shifting down.
ev_err_t _timer_untree (ev_ctx_t *ctx, ev_tim_t *tim)
 Remove a timer from the timer tree.

Variables

const _ev_attr_t const * _ev_defattr
 Default library attributes.
ev_flags_t _ev_asflags
 Library logging flags.
ev_log_t _ev_debuglog
 Library logging function callback.


Define Documentation

#define __builtin_expect expr,
expect   ) 
 

For internal use only.

GCC has a built-in that hints to the compiler that a given expression is expected to have a certain value. GCC may then be able to perform some optimizations. This macro is only defined if the compiler is *not* GCC, and simplifies the expression for the benefit of such foreign compilers.

Parameters:
[in] expr The expression being calculated.
[in] expect The value the expression is expected to take.

Definition at line 70 of file event_int.h.

#define __EVENT_LIBRARY__
 

For internal use only.

This macro signals to the public header files that they are being used by the library itself. This is mostly used to control inclusions.

Definition at line 38 of file event_int.h.

#define _ea attr,
field   ) 
 

For internal use only.

The event attributes structure is rather complicated to access. This macro helps simplify access to particular fields. The attr parameter must be a pointer to an ev_attr_t, or a pointer to a pointer to an _ev_attr_t.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
[in] field The name of the event attribute structure field to access (minus the leading ea_).

Definition at line 263 of file event_int.h.

#define _gca_format archetype,
index,
first   ) 
 

For internal use only.

This attribute is used to inform GCC that a function uses a printf-style format string, allowing GCC to check the function's arguments against the format string. For more information, see the GCC documentation for the format function attribute.

Parameters:
[in] archetype The archetype of the format function--one of printf, scanf, strftime, or strfmon.
[in] index The index in the parameter list of the format string.
[in] first The index of the first argument in the variable argument list, or zero if that isn't available.

Definition at line 97 of file event_int.h.

#define _gca_func
 

For internal use only.

This macro simply expands to whatever magic symbol will obtain the current function name. If this is not possible with the current compiler, it will be NULL.

Definition at line 124 of file event_int.h.

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

#define _gca_have_func
 

For internal use only.

This macro is defined to 1 if it is possible to retrieve the function name from the current compiler.

Definition at line 125 of file event_int.h.

#define ea_confpath attr   ) 
 

For internal use only.

This macro is used to retrieve the configuration path from an event attributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A constant pointer to char containing the value of the configuration path.

Definition at line 294 of file event_int.h.

Referenced by event_attr_confpath(), event_init(), and main().

#define ea_engines attr   ) 
 

For internal use only.

This macro is used to register application-provided engines with the attributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A pointer to an ev_engine_t beginning the list of application-provide event engines.

Definition at line 369 of file event_int.h.

Referenced by event_attr_engine(), and event_init().

#define ea_libpath attr   ) 
 

For internal use only.

This macro is used to retrieve the library search path from an event attributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A constant pointer to char containing the value of the library path.

Definition at line 309 of file event_int.h.

Referenced by event_attr_libpath(), event_init(), and main().

#define ea_modlist attr   ) 
 

For internal use only.

This macro is used to retrieve the module list from an event attributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A constant pointer to char containing the value of the module list.

Definition at line 324 of file event_int.h.

Referenced by event_attr_modlist(), event_init(), and main().

#define ea_ovars attr   ) 
 

For internal use only.

This macro is used to retrieve the list of application-overridden variables from an event attributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A pointer to an ev_overvars_t containing the list of application-overridden variables.

Definition at line 354 of file event_int.h.

Referenced by event_attr_confvar(), event_attr_destroy(), event_init(), and main().

#define ea_varlist attr   ) 
 

For internal use only.

This macro is used to retrieve the list of application-registered variables from an event atttributes object.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
A pointer to an ev_varlist_t containing the list of application-registered variables.

Definition at line 339 of file event_int.h.

Referenced by event_attr_confreg(), event_attr_destroy(), event_init(), and main().

#define ea_verify attr   ) 
 

For internal use only.

This macro verifies that attr is a pointer to a valid ev_attr_t.

Parameters:
[in] attr A pointer to an ev_attr_t (or a pointer to a pointer to an _ev_attr_t).
Returns:
Boolean true if attr is a valid event attributes object or false otherwise.

Definition at line 278 of file event_int.h.

Referenced by event_attr_confpath(), event_attr_confreg(), event_attr_confvar(), event_attr_destroy(), event_attr_engine(), event_attr_libpath(), event_attr_modlist(), event_init(), and main().

 
#define ev_abort  ) 
 

For internal use only.

Libraries really shouldn't abort, so a library assert() macro should just return some kind of error--in this case, EV_ERR_ASSERT. But if the application permits, we may be permitted to go ahead and abort(), in which case we should, just to stop the application in its tracks.

Test:
This macro is tested in t_event_log.c.

Definition at line 502 of file event_int.h.

Referenced by _ev_abort().

#define ev_assert expr   ) 
 

For internal use only.

It is possible that there will be some catastrophic library assertion failure. Normally, libraries should not call the assert() macro, as it's rather bad manners to abort in a library, and the application may need to do some critical clean-up. Nevertheless, assertions are very useful debugging tools. Therefore, we provide our own assert() macro, using ev_abort() to either call abort() (if permitted) or to just return the failure code EV_ERR_ASSERT. This macro may also optionally log a message, if the application has provided a logging function and permits logging to be done.

Test:
This macro is tested in t_event_log.c.
Parameters:
[in] expr The expression being asserted.

Definition at line 528 of file event_int.h.

Referenced by _ev_assert(), _timer_insert(), _timer_untree(), engine_load(), event_destroy(), event_gen_alloc(), event_gen_register(), gens_extend(), gens_merge(), node_swap(), and sockaddr_import().

#define EV_ATTR_MAGIC
 

For internal use only.

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

Definition at line 246 of file event_int.h.

#define EV_CTX_LTDLINIT
 

For internal use only.

This flag, if set, indicates that the LTDL library has been initialized with a call to lt_dlinit(). It is only used by event_destroy() to signal that it must call lt_dlexit().

Definition at line 144 of file event_int.h.

Referenced by event_destroy(), and event_init().

#define ev_gen_init ctx,
gen,
gd   ) 
 

For internal use only.

This macro is used to initialize a generator header given a descriptor for the generator.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] gen The generator header to initialize.
[in] gd The descriptor of the generator.

Definition at line 602 of file event_int.h.

Referenced by event_gen_alloc().

 
#define ev_init  ) 
 

For internal use only.

There are a couple of tasks every library function needs to begin with. This macro simply performs all the initialization tasks: making certain the error table has been registered and making certain a library assertion hasn't been raised. The application may also turn on function tracing, which will cause a log message indicating function entry to be written to the application-provided logging function (assuming one is defined). (Even if _gca_func cannot be provided, the file and line number information can help determine which function it was, particularly given that most functions are in files by themselves.)

Test:
This macro is tested in t_event_log.c.

Definition at line 566 of file event_int.h.

Referenced by _ev_gen_lookup(), _ev_init(), engine_activate(), engine_register(), event_attr_confpath(), event_attr_confreg(), event_attr_confvar(), event_attr_destroy(), event_attr_engine(), event_attr_init(), event_attr_libpath(), event_attr_modlist(), event_destroy(), event_gen_alloc(), event_gen_register(), event_gen_release(), event_init(), event_log_abort(), event_log_debug(), event_log_reset(), event_log_set(), event_log_trace(), sa_ipaddrbuf_set(), sa_ipaddrport_set(), sa_localaddr_set(), sa_type_set(), signal_create(), signal_destroy(), sockaddr_atop(), sockaddr_export(), sockaddr_import(), sockaddr_ptoa(), timer_create(), timer_destroy(), and timer_resched().

#define ev_log flag,
msg   ) 
 

For internal use only.

Some debugging data may be desired; this macro just helps with logging that data.

Test:
This macro is tested in t_event_log.c.
Parameters:
[in] flag One of EVAS_LOG or EVAS_TRACE; if the flag is set in _ev_asflags, msg will be logged.
[in] msg The message to be logged.

Definition at line 485 of file event_int.h.

Referenced by _ev_log().

#define ev_return val   ) 
 

For internal use only.

This macro is used in liu of return from the event library functions in order to log function exit if tracing is enabled.

Test:
This macro is tested in t_event_log.c.
Parameters:
[in] val The value to return.

Definition at line 584 of file event_int.h.

Referenced by _ev_gen_lookup(), _timer_heapify_down(), _timer_heapify_up(), _timer_insert(), _timer_untree(), atop_v4(), atop_v6(), engine_activate(), engine_load(), engine_register(), event_attr_confpath(), event_attr_confreg(), event_attr_confvar(), event_attr_destroy(), event_attr_engine(), event_attr_init(), event_attr_libpath(), event_attr_modlist(), event_destroy(), event_gen_alloc(), event_gen_register(), event_gen_release(), event_init(), event_log_abort(), event_log_debug(), event_log_reset(), event_log_set(), event_log_trace(), gens_construct(), gens_extend(), gens_merge(), node_swap(), sa_ipaddrbuf_set(), sa_ipaddrport_set(), sa_localaddr_set(), sa_type_set(), signal_create(), signal_destroy(), sockaddr_atop(), sockaddr_export(), sockaddr_import(), sockaddr_ptoa(), timer_create(), timer_destroy(), and timer_resched().

 
#define ev_trace  ) 
 

For internal use only.

This macro is used to log function entry. It is separate from ev_init() so that it can be used by internal functions that don't need to call ev_init().

Test:
This macro is implicitly tested in t_event_log.c.

Definition at line 548 of file event_int.h.

Referenced by _timer_heapify_down(), _timer_heapify_up(), _timer_insert(), _timer_untree(), atop_v4(), atop_v6(), engine_load(), gens_construct(), gens_extend(), gens_merge(), and node_swap().

#define EVAS_ABORT
 

For internal use only.

If this flag is set in _ev_asflags, ev_abort() will call the system abort() function, terminating program execution.

Definition at line 442 of file event_int.h.

Referenced by event_log_abort(), and main().

#define EVAS_LOG
 

For internal use only.

If this flag is set in _ev_asflags, library logging is enabled (assuming _ev_debuglog is non-NULL).

Definition at line 434 of file event_int.h.

Referenced by engine_load(), event_destroy(), event_log_debug(), event_log_reset(), event_log_set(), and main().

#define EVAS_LOOP
 

For internal use only.

If this flag is set in _ev_asflags, then an ev_assert() has failed. Although program execution is not stopped, the library may not be called again after an assertion failure; the program should clean up and exit.

Definition at line 452 of file event_int.h.

Referenced by main().

#define EVAS_TRACE
 

For internal use only.

If this flag is set in _ev_asflags, then function tracing is enabled. All function entries will result in a log message.

Definition at line 460 of file event_int.h.

Referenced by event_log_reset(), event_log_trace(), and main().

#define RCSTAG tag   ) 
 

For internal use only.

Embeds the tag (a string including the RCS Id tag) into the binary. This can be useful when tracking down version skew issues.

Definition at line 135 of file event_int.h.

#define so_blocked_clr sock,
flags   ) 
 

For internal use only.

This macro is used to clear the blocked 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 752 of file event_int.h.

#define so_blocked_set sock,
flags   ) 
 

For internal use only.

This macro is used to set the blocked 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 740 of file event_int.h.

#define so_closed_clr sock,
flags   ) 
 

For internal use only.

This macro is used to clear the closed flags on a socket. This macro is prvided solely for completeness; the closed flags should probably never be cleared.

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

Definition at line 778 of file event_int.h.

#define so_closed_set sock,
flags   ) 
 

For internal use only.

This macro is used to set the closed 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 764 of file event_int.h.

#define so_uevents_clr sock,
flags   ) 
 

For internal use only.

This macro is used to clear the user 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 event_int.h.

#define so_uevents_set sock,
flags   ) 
 

For internal use only.

This macro is used to set the user 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 716 of file event_int.h.

#define ti_expire_comp tim   ) 
 

For internal use only.

This macro is used to compute and set the expiration time for the given timer.

Parameters:
[in] tim A pointer to the ev_tim_t to be updated.

Definition at line 694 of file event_int.h.

Referenced by timer_create(), and timer_resched().

#define tt_node_fix tim   ) 
 

For internal use only.

This macro is used to repair the links to a given timer node.

Parameters:
[in] tim A pointer to an ev_tim_t.

Definition at line 648 of file event_int.h.

Referenced by _timer_untree(), and node_swap().

#define tt_node_init tim,
parent,
prev   ) 
 

For internal use only.

This macro is used to initialize the timer node structure within a timer descriptor.

Parameters:
[in] tim A pointer to an ev_tim_t to be initialized.
[in] parent The parent of the given timer.
[in] prev The previous node in the tree's thread.

Definition at line 673 of file event_int.h.

Referenced by _timer_insert(), and _timer_untree().

#define tv_comp tv1,
tv2   ) 
 

For internal use only.

This macro returns a 0 value if the two struct timeval values are equivalent; otherwise, it returns a positive value if tv1 is greater than tv2, or a negative value if tv1 is less than tv2.

Parameters:
[in] tv1 A pointer to a struct timeval containing the first value for comparison.
[in] tv2 A pointer to a struct timeval containing the second value for comparison.
Returns:
A positive value, zero, or a negative value depending upon whether tv1 is greater than, equal to, or less than tv2, respectively.

Definition at line 637 of file event_int.h.

Referenced by _timer_heapify_down(), _timer_heapify_up(), _timer_untree(), and timer_resched().


Typedef Documentation

typedef struct _ev_attr_s _ev_attr_t
 

For internal use only.

This type is a helper type for declaring an attribute set. The ev_attr_t type, declared in event.h, is a pointer to this type, and should be treated by the user as an opaque object.

Definition at line 169 of file event_int.h.

typedef struct _ev_gendesc_s ev_gendesc_t
 

For internal use only.

This type is a helper type for describing a specific type of generator. It contains two lists of the described generator--a list of active generators and a free list.

Definition at line 187 of file event_int.h.

typedef struct _ev_genlist_s ev_genlist_t
 

For internal use only.

This type is a helper type for keeping a list of generators. It is used for keeping track of a free list, as well as for keeping a list of active generators.

Definition at line 178 of file event_int.h.

typedef struct _ev_gens_s ev_gens_t
 

For internal use only.

This type is a helper type for describing a number of generators (with sequential generator types; see ev_gentype_t). It is part of linked list rooted in an ev_ctx_t; each element in the linked list describes one or more generators.

Definition at line 197 of file event_int.h.

typedef struct _ev_overvars_s ev_overvars_t
 

For internal use only.

This type represents one of a list of application-overridden variables.

Definition at line 160 of file event_int.h.

typedef struct _ev_varlist_s ev_varlist_t
 

For internal use only.

This type represents one of a list of application-registered variables.

Definition at line 152 of file event_int.h.


Function Documentation

void _ev_debug ev_flags_t  flags,
const char *  file,
int  line,
const char *  func,
const char *  fmt,
  ...
 

For internal use only.

This function is used when the ev_log() macro is insufficient. It will call snprintf() to format a log message, then call the user logging function to log the message.

Test:
This function is tested in t_event_log.c.
Parameters:
[in] flags One of EVAS_LOG or EVAS_TRACE; if the flag is set in _ev_asflags, msg will be logged.
[in] file The file name.
[in] line The line number in the file.
[in] func The name of the containing function, or NULL if function names are not available.
[in] fmt The format string.

Definition at line 134 of file event_log.c.

References _ev_asflags, _ev_debuglog, and DEBUG_BUF.

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

ev_err_t _ev_gen_lookup ev_ctx_t ctx,
unsigned int  gentype,
ev_gendesc_t **  gen
 

For internal use only.

This function looks up the ev_gendesc_t describing the generator gentype.

Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] gentype An unsigned int specifying the generator type to look up.
[in] gen A pointer to a pointer to an ev_gendesc_t which will be used to return the result.
Return values:
ENOENT No such generator has been registered.

Definition at line 33 of file _ev_gen_lookup.c.

References _ev_ctx_s::ec_gens, _ev_ctx_s::ec_maxgen, ev_init, ev_return, _ev_gens_s::gs_count, _ev_gens_s::gs_first, _ev_gens_s::gs_gens, and _ev_gens_s::gs_next.

Referenced by event_gen_alloc(), event_gen_release(), and main().

ev_err_t _timer_heapify_down ev_ctx_t ctx,
ev_tim_t tim
 

For internal use only.

This function restores the heap property of the timer tree by shifting the given node down within the tree.

Test:
This function is tested in t_timer_fcns.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] tim A pointer to an ev_tim_t.
Returns:
Zero on success, non-zero if an assertion failure occurs.

Definition at line 121 of file _timer_heapify.c.

References ev_return, ev_trace, node_swap(), _ev_tim_s::ti_expire, _ev_tim_s::ti_node, _ev_timnode_s::tn_left, _ev_timnode_s::tn_right, and tv_comp.

Referenced by _timer_untree(), and timer_resched().

Here is the call graph for this function:

ev_err_t _timer_heapify_up ev_ctx_t ctx,
ev_tim_t tim
 

For internal use only.

This function restores the heap property of the timer tree by shifting the given node up within the tree.

Test:
This function is tested in t_timer_fcns.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] tim A pointer to an ev_tim_t.
Returns:
Zero on success, non-zero if an assertion failure occurs.

Definition at line 105 of file _timer_heapify.c.

References ev_return, ev_trace, node_swap(), _ev_tim_s::ti_expire, _ev_tim_s::ti_node, _ev_timnode_s::tn_parent, and tv_comp.

Referenced by _timer_insert(), _timer_untree(), and timer_resched().

Here is the call graph for this function:

ev_err_t _timer_insert ev_ctx_t ctx,
ev_tim_t tim
 

For internal use only.

This function inserts the given timer into the timer tree, maintaining the heap property of the tree.

Test:
This function is tested in t_timer_fcns.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] tim A pointer to an ev_tim_t to be inserted.
Returns:
Zero on success, non-zero if an assertion failure occurs.

Definition at line 34 of file timer_create.c.

References _timer_heapify_up(), _ev_ctx_s::ec_timtree, ev_assert, ev_return, ev_trace, timer_destroy(), and tt_node_init.

Referenced by timer_create(), and timer_resched().

Here is the call graph for this function:

ev_err_t _timer_untree ev_ctx_t ctx,
ev_tim_t tim
 

For internal use only.

This function removes the specified timer from the timer tree, restoring the tree's heap property in the process.

Test:
This function is tested in t_timer_fcns.c.
Parameters:
[in] ctx A pointer to an ev_ctx_t.
[in] tim A pointer to the ev_tim_t to remove from the tree.
Returns:
Zero on success, non-zero if an assertion failure occurs.

Definition at line 32 of file timer_destroy.c.

References _timer_heapify_down(), _timer_heapify_up(), _ev_ctx_s::ec_timtree, ev_assert, ev_return, ev_trace, _ev_tim_s::ti_expire, _ev_tim_s::ti_node, _ev_timnode_s::tn_left, _ev_timnode_s::tn_next, _ev_timnode_s::tn_parent, _ev_timnode_s::tn_prev, _ev_timnode_s::tn_right, tt_node_fix, tt_node_init, and tv_comp.

Referenced by timer_destroy(), and timer_resched().

Here is the call graph for this function:


Variable Documentation

ev_flags_t _ev_asflags
 

For internal use only.

This variable contains a set of flags controlling the logging and assertion behavior of the library. The available flags are EVAS_LOG, EVAS_ABORT, EVAS_LOOP, and EVAS_TRACE. This variable should only be manipulated by means of the event_log_debug(), event_log_trace(), and event_log_abort() functions.

Definition at line 41 of file event_log.c.

Referenced by _ev_debug(), event_log_abort(), event_log_debug(), event_log_reset(), event_log_set(), event_log_trace(), and main().

ev_log_t _ev_debuglog
 

For internal use only.

This variable contains a pointer to the function to be used for logging. See the documentation for the ev_log_t type for more information. It should only be manipulated by means of event_log_set() and event_log_reset().

Definition at line 64 of file event_log.c.

Referenced by _ev_debug(), event_log_reset(), event_log_set(), and main().

const _ev_attr_t const* _ev_defattr
 

For internal use only.

This variable contains a pointer to the default attribute set. It is primarily useful for event_init() and event_attr_init().

Definition at line 130 of file event_init.c.

Referenced by event_attr_init(), and main().


Generated on Wed Dec 28 23:37:21 2005 for event by  doxygen 1.4.4