For internal use only.
This file contains the implementation of the _timer_heapify_up() and the _timer_heapify_down() functions, used to restore the heap property in the timer tree.
Definition in file _timer_heapify.c.
#include "event_int.h"
Include dependency graph for _timer_heapify.c:
Go to the source code of this file.
Functions | |
static ev_err_t | node_swap (ev_ctx_t *ctx, ev_tim_t *tim) |
Swap a node with its parent. | |
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. |
|
For internal use only. This function restores the heap property of the timer tree by shifting the given node down within the tree.
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: ![]() |
|
For internal use only. This function restores the heap property of the timer tree by shifting the given node up within the tree.
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: ![]() |
|
For internal use only. This helper function swaps a node with its parent, performing, in essence, a tree rotation.
Definition at line 47 of file _timer_heapify.c. References _ev_ctx_s::ec_timtree, ev_assert, ev_return, ev_trace, _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, and tt_node_fix. Referenced by _timer_heapify_down(), and _timer_heapify_up(). |