VSF Documented
vsf_timq_dlist.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_TIMQ_DLIST_H__
19#define __VSF_TIMQ_DLIST_H__
20
21/*============================ INCLUDES ======================================*/
23
24#if VSF_USE_KERNEL == ENABLED
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/*============================ MACROS ========================================*/
31
32#define vsf_timq_init(__queue) vsf_dlist_init(__queue)
33
34#define vsf_timq_insert(__queue, __teda) \
35 vsf_dlist_insert( \
36 vsf_teda_t, timer_node, \
37 (__queue), \
38 (__teda), \
39 _->due >= (__teda)->due)
40
41#define vsf_timq_remove(__queue, __teda) \
42 vsf_dlist_remove( \
43 vsf_teda_t, timer_node, \
44 (__queue), \
45 (__teda))
46
47#define vsf_timq_peek(__queue, __teda) \
48 vsf_dlist_queue_peek( \
49 vsf_teda_t, timer_node, \
50 (__queue), \
51 (__teda))
52
53#define vsf_timq_dequeue(__queue, __teda) \
54 vsf_dlist_queue_dequeue( \
55 vsf_teda_t, timer_node, \
56 (__queue), \
57 (__teda))
58
59
60
61#define vsf_callback_timq_init(__queue) vsf_dlist_init(__queue)
62
63#define vsf_callback_timq_enqueue(__queue, __timer) \
64 vsf_dlist_queue_enqueue( \
65 vsf_callback_timer_t, timer_node, \
66 (__queue), \
67 (__timer))
68
69#define vsf_callback_timq_insert(__queue, __timer) \
70 vsf_dlist_insert( \
71 vsf_callback_timer_t, timer_node, \
72 (__queue), \
73 (__timer), \
74 _->due >= (__timer)->due)
75
76#define vsf_callback_timq_remove(__queue, __timer) \
77 vsf_dlist_remove( \
78 vsf_callback_timer_t, timer_node, \
79 (__queue), \
80 (__timer))
81
82#define vsf_callback_timq_peek(__queue, __timer) \
83 vsf_dlist_queue_peek( \
84 vsf_callback_timer_t, timer_node, \
85 (__queue), \
86 (__timer))
87
88#define vsf_callback_timq_dequeue(__queue, __timer) \
89 vsf_dlist_queue_dequeue( \
90 vsf_callback_timer_t, timer_node, \
91 (__queue), \
92 (__timer))
93
94/*============================ TYPES =========================================*/
95
97
98/*============================ GLOBAL VARIABLES ==============================*/
99/*============================ PROTOTYPES ====================================*/
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif
106#endif
Definition vsf_list.h:883
vsf_dlist_t vsf_timer_queue_t
Definition vsf_timq_dlist.h:96