Go to the documentation of this file.
18#ifndef __VSF_TASK_COMMON_H__
19#define __VSF_TASK_COMMON_H__
23#if VSF_USE_KERNEL == ENABLED
24#include "../vsf_eda.h"
33#define __vsf_pt_begin_common(__state) \
35 count_offset = __COUNTER__ + 1, \
37 switch ((__state)) { \
38 case __COUNTER__ - count_offset:
40#define __vsf_pt_raw_next_common(__state) \
41 (__state) = (__COUNTER__ - count_offset + 1) >> 1
42#define __vsf_pt_raw_entry_common(__state, ...) \
44 case (__COUNTER__ - count_offset) >> 1:
46#define __vsf_pt_entry_common(__state, ...) \
47 __vsf_pt_raw_entry_common(__state, \
48 __vsf_pt_raw_next_common(__state); \
52#define __vsf_pt_end_common() } vsf_eda_return();
58#define __vsf_pt_wait_cond_common(__state, ...) \
60 evt = VSF_EVT_INVALID; \
61 __vsf_pt_entry_common(__state); \
62 if (!(__VA_ARGS__)) { \
68#define __vsf_pt_wfe_common(__state, __evt) \
69 __vsf_pt_wait_cond_common(__state, (evt == __evt))
71#define __vsf_pt_func_common(__name) vsf_pt_func_##__name
72#define __vsf_pt_common(__name) pt_cb_##__name
74#define __def_vsf_pt_common(__name, ...) \
75 struct __vsf_pt_common(__name) { \
80 implement_ex(__vsf_pt_common(__name), param) \
83#define __declare_vsf_pt_common(__name) \
84 typedef struct __name __name; \
85 typedef struct __vsf_pt_common(__name) __vsf_pt_common(__name);
88#define __implement_vsf_pt_common(__name, __arg0) \
89 void __vsf_pt_func_common(__name)(__arg0, vsf_evt_t evt)
91#define __extern_vsf_pt_common(__name, __arg0) \
92 extern void __vsf_pt_func_common(__name)(__arg0, vsf_evt_t evt);