skins/rtai/cond.h

Go to the documentation of this file.
00001 00049 #ifndef _RTAI_COND_H 00050 #define _RTAI_COND_H 00051 00052 #include <nucleus/synch.h> 00053 #include <rtai/types.h> 00054 00055 struct RT_MUTEX; 00056 00057 typedef struct rt_cond_info { 00058 00059 int nsleepers; /* !< Number of pending tasks. */ 00060 00061 char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */ 00062 00063 } RT_COND_INFO; 00064 00065 typedef struct rt_cond_placeholder { 00066 rt_handle_t opaque; 00067 } RT_COND_PLACEHOLDER; 00068 00069 #if defined(__KERNEL__) || defined(__RTAI_SIM__) 00070 00071 #define RTAI_COND_MAGIC 0x55550606 00072 00073 typedef struct rt_cond { 00074 00075 unsigned magic; /* !< Magic code - must be first */ 00076 00077 xnsynch_t synch_base; /* !< Base synchronization object. */ 00078 00079 rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */ 00080 00081 char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */ 00082 00083 } RT_COND; 00084 00085 #ifdef __cplusplus 00086 extern "C" { 00087 #endif 00088 00089 int __cond_pkg_init(void); 00090 00091 void __cond_pkg_cleanup(void); 00092 00093 #ifdef __cplusplus 00094 } 00095 #endif 00096 00097 #else /* !(__KERNEL__ || __RTAI_SIM__) */ 00098 00099 typedef RT_COND_PLACEHOLDER RT_COND; 00100 00101 int rt_cond_bind(RT_COND *cond, 00102 const char *name); 00103 00104 #endif /* __KERNEL__ || __RTAI_SIM__ */ 00105 00106 #ifdef __cplusplus 00107 extern "C" { 00108 #endif 00109 00110 /* Public interface. */ 00111 00112 int rt_cond_create(RT_COND *cond, 00113 const char *name); 00114 00115 int rt_cond_delete(RT_COND *cond); 00116 00117 int rt_cond_signal(RT_COND *cond); 00118 00119 int rt_cond_broadcast(RT_COND *cond); 00120 00121 int rt_cond_wait(RT_COND *cond, 00122 RT_MUTEX *mutex, 00123 RTIME timeout); 00124 00125 int rt_cond_inquire(RT_COND *cond, 00126 RT_COND_INFO *info); 00127 00128 #ifdef __cplusplus 00129 } 00130 #endif 00131 00132 #endif /* !_RTAI_COND_H */

Generated on Mon Aug 30 13:58:39 2004 for RTAI API by doxygen 1.3.8