Xenomai API  2.6.5
vdso.h
Go to the documentation of this file.
1 #ifndef _XENO_NUCLEUS_VDSO_H
2 #define _XENO_NUCLEUS_VDSO_H
3 
26 #include <nucleus/types.h>
27 #include <nucleus/hostrt.h>
28 
29 /*
30  * Data shared between Xenomai kernel/userland and the Linux kernel/userland
31  * on the global semaphore heap. The features element indicates which data are
32  * shared. Notice that struct xnvdso may only grow, but never shrink.
33  */
34 struct xnvdso {
35  unsigned long long features;
36 
37  struct xnvdso_hostrt_data hostrt_data;
38  /*
39  * Embed further domain specific structures that
40  * describe the shared data here
41  */
42 };
43 
44 /*
45  * For each shared feature, add a flag below. For now, the set is still
46  * empty.
47  */
48 /*
49 #define XNVDSO_FEAT_A 0x0000000000000001ULL
50 #define XNVDSO_FEAT_B 0x0000000000000002ULL
51 #define XNVDSO_FEAT_C 0x0000000000000004ULL
52 #define XNVDSO_FEATURES (XNVDSO_FEAT_A | XNVDSO_FEAT_B | XVDSO_FEAT_C)
53 */
54 #define XNVDSO_FEAT_HOST_REALTIME 0x0000000000000001ULL
55 #ifdef CONFIG_XENO_OPT_HOSTRT
56 #define XNVDSO_FEATURES XNVDSO_FEAT_HOST_REALTIME
57 #else
58 #define XNVDSO_FEATURES 0
59 #endif /* CONFIG_XENO_OPT_HOSTRT */
60 
61 extern struct xnvdso *nkvdso;
62 
63 static inline struct xnvdso_hostrt_data *get_hostrt_data(void)
64 {
65  return &nkvdso->hostrt_data;
66 }
67 
68 static inline int xnvdso_test_feature(unsigned long long feature)
69 {
70  return testbits(nkvdso->features, feature);
71 }
72 
73 extern void xnheap_init_vdso(void);
74 #endif /* _XENO_NUCLEUS_VDSO_H */
Definitions for global semaphore heap shared objects.