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

timer_create.c File Reference


Detailed Description

For internal use only.

This file contains the implementation of the timer_create() function, used to create a new timer, as well as the implementation of the _timer_insert() function to insert a timer into the timer tree.

Definition in file timer_create.c.

#include "engines_int.h"

Include dependency graph for timer_create.c:

Go to the source code of this file.

Functions

ev_err_t _timer_insert (ev_ctx_t *ctx, ev_tim_t *tim)
 Insert a timer into the timer tree.
ev_err_t timer_create (ev_ctx_t *ctx, ev_timtype_t type, struct timeval *value, ev_call_t call, void *data, ev_tim_t **tim_p)
 Create a timer.


Function Documentation

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:


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