Xenomai API
2.5.6.1
|
00001 #ifndef _XENO_NUCLEUS_SYS_PPD_H 00002 #define _XENO_NUCLEUS_SYS_PPD_H 00003 00004 #include <nucleus/ppd.h> 00005 #include <nucleus/heap.h> 00006 00007 struct xnsys_ppd { 00008 xnshadow_ppd_t ppd; 00009 xnheap_t sem_heap; 00010 00011 #define ppd2sys(addr) container_of(addr, struct xnsys_ppd, ppd) 00012 }; 00013 00014 extern struct xnsys_ppd __xnsys_global_ppd; 00015 00016 #ifdef CONFIG_XENO_OPT_PERVASIVE 00017 00018 static inline struct xnsys_ppd *xnsys_ppd_get(int global) 00019 { 00020 xnshadow_ppd_t *ppd; 00021 00022 if (global || !(ppd = xnshadow_ppd_get(0))) 00023 return &__xnsys_global_ppd; 00024 00025 return ppd2sys(ppd); 00026 } 00027 00028 #else /* !CONFIG_XENO_OPT_PERVASIVE */ 00029 00030 static inline struct xnsys_ppd *xnsys_ppd_get(int global) 00031 { 00032 return &__xnsys_global_ppd; 00033 } 00034 00035 #endif /* !CONFIG_XENO_OPT_PERVASIVE */ 00036 00037 #endif /* _XENO_NUCLEUS_SYS_PPD_H */