Xenomai API  2.6.5
types.h
Go to the documentation of this file.
1 
22 #ifndef _XENO_TYPES_H
23 #define _XENO_TYPES_H
24 
25 #define XENO_SKIN_MAGIC 0x52544149
26 
27 #include <nucleus/types.h>
28 
29 #define TM_INFINITE XN_INFINITE
30 #define TM_NONBLOCK XN_NONBLOCK
31 #define TM_NOW XN_INFINITE
32 
33 #if defined(__KERNEL__) || defined(__XENO_SIM__)
34 
35 #ifndef CONFIG_XENO_OPT_DEBUG_NATIVE
36 #define CONFIG_XENO_OPT_DEBUG_NATIVE 0
37 #endif
38 
39 typedef xnticks_t RTIME;
40 
41 typedef xnsticks_t SRTIME;
42 
43 #define xeno_h2obj_validate(h,m,t) \
44 ((h) && ((t *)(h))->magic == (m) ? ((t *)(h)) : NULL)
45 
46 #define xeno_h2obj_deleted(h,m,t) \
47 ((h) && ((t *)(h))->magic == ~(m))
48 
49 #define xeno_mark_deleted(t) ((t)->magic = ~(t)->magic)
50 
51 #define xeno_handle_error(h,m,t) \
52 (xeno_h2obj_deleted(h,m,t) ? -EIDRM : -EINVAL)
53 
54 #define xeno_test_magic(h,m) \
55 ((h) && *((unsigned *)(h)) == (m))
56 
57 #else /* !(__KERNEL__ || __XENO_SIM__) */
58 
59 typedef unsigned long long RTIME;
60 
61 typedef long long SRTIME;
62 
63 #endif /* __KERNEL__ || __XENO_SIM__ */
64 
65 typedef xnsigmask_t rt_sigset_t;
66 
67 #define RT_HANDLER_NONE XNTHREAD_INVALID_ASR
68 
69 struct rt_alarm;
70 
71 typedef void (*rt_alarm_t)(struct rt_alarm *alarm,
72  void *cookie);
73 
74 typedef xnisr_t rt_isr_t;
75 
76 typedef xniack_t rt_iack_t;
77 
78 #endif /* !_XENO_TYPES_H */