]> rtime.felk.cvut.cz Git - ulut.git/blob - ulut/ul_htimbase.c
ul_dbuffprintf omitted from minimal build because vsnprintf is not supported by SDCC.
[ulut.git] / ulut / ul_htimbase.c
1 /*******************************************************************
2   uLan Utilities Library - C library of basic reusable constructions
3
4   ul_htimbase.c - hierarchical timer base declarations
5
6   (C) Copyright 2003 by Pavel Pisa - Originator
7
8   The uLan utilities library can be used, copied and modified under
9   next licenses
10     - GPL - GNU General Public License
11     - LGPL - GNU Lesser General Public License
12     - MPL - Mozilla Public License
13     - and other licenses added by project originators
14   Code can be modified and re-distributed under any combination
15   of the above listed licenses. If contributor does not agree with
16   some of the licenses, he/she can delete appropriate line.
17   Warning, if you delete all lines, you are not allowed to
18   distribute source code and/or binaries utilizing code.
19   
20   See files COPYING and README for details.
21
22  *******************************************************************/
23
24 #include <string.h>
25
26 #define UL_HTIMER_INC_FROM_BASE
27 #include "ul_htimer.h"
28
29 #ifndef UL_HTIMER_WITH_HPTREE
30  #include "ul_gavl.h"
31  #include "ul_gavlflesint.h"
32 #else /*UL_HTIMER_WITH_HPTREE*/
33  #include "ul_hptree.h"
34 #endif /*UL_HTIMER_WITH_HPTREE*/
35
36 #ifndef UL_HTIMER_WITH_HPTREE
37
38 GAVL_FLES_INT_DEC(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
39         timers, node, expires, ul_htimer_cmp_fnc)
40
41
42 GAVL_FLES_INT_IMP(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
43         timers, node, expires, ul_htimer_cmp_fnc, GAVL_FAFTER, 
44         root->first_changed=1,,root->first_changed=1)
45
46 #else /*UL_HTIMER_WITH_HPTREE*/
47
48 UL_HPTREE_DEC(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
49         timers, node, expires, ul_htimer_cmp_fnc)
50
51
52 UL_HPTREE_IMP(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
53         timers, node, expires, ul_htimer_cmp_fnc, GAVL_FAFTER, 
54         root->first_changed=1,root->first_changed=1)
55
56 #endif /*UL_HTIMER_WITH_HPTREE*/