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
42#define vsf_timq_init(__queue) vsf_dlist_init(__queue)
43
56#define vsf_timq_insert(__queue, __teda) \
57 vsf_dlist_insert( \
58 vsf_teda_t, timer_node, \
59 (__queue), \
60 (__teda), \
61 _->due >= (__teda)->due)
62
75#define vsf_timq_remove(__queue, __teda) \
76 vsf_dlist_remove( \
77 vsf_teda_t, timer_node, \
78 (__queue), \
79 (__teda))
80
95#define vsf_timq_peek(__queue, __teda) \
96 vsf_dlist_queue_peek( \
97 vsf_teda_t, timer_node, \
98 (__queue), \
99 (__teda))
100
115#define vsf_timq_dequeue(__queue, __teda) \
116 vsf_dlist_queue_dequeue( \
117 vsf_teda_t, timer_node, \
118 (__queue), \
119 (__teda))
120
121
122
133#define vsf_callback_timq_init(__queue) vsf_dlist_init(__queue)
134
147#define vsf_callback_timq_enqueue(__queue, __timer) \
148 vsf_dlist_queue_enqueue( \
149 vsf_callback_timer_t, timer_node, \
150 (__queue), \
151 (__timer))
152
165#define vsf_callback_timq_insert(__queue, __timer) \
166 vsf_dlist_insert( \
167 vsf_callback_timer_t, timer_node, \
168 (__queue), \
169 (__timer), \
170 _->due >= (__timer)->due)
171
184#define vsf_callback_timq_remove(__queue, __timer) \
185 vsf_dlist_remove( \
186 vsf_callback_timer_t, timer_node, \
187 (__queue), \
188 (__timer))
189
204#define vsf_callback_timq_peek(__queue, __timer) \
205 vsf_dlist_queue_peek( \
206 vsf_callback_timer_t, timer_node, \
207 (__queue), \
208 (__timer))
209
224#define vsf_callback_timq_dequeue(__queue, __timer) \
225 vsf_dlist_queue_dequeue( \
226 vsf_callback_timer_t, timer_node, \
227 (__queue), \
228 (__timer))
229
230/*============================ TYPES =========================================*/
231
233
234/*============================ GLOBAL VARIABLES ==============================*/
235/*============================ PROTOTYPES ====================================*/
236
237#ifdef __cplusplus
238}
239#endif
240
241#endif
242#endif
Definition vsf_list.h:883
vsf_dlist_t vsf_timer_queue_t
Definition vsf_timq_dlist.h:232
Generated from commit: vsfteam/vsf@a5104db