All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_mutex.h
Go to the documentation of this file.
1 
156 #ifndef LEGATO_MUTEX_INCLUDE_GUARD
157 #define LEGATO_MUTEX_INCLUDE_GUARD
158 
159 //--------------------------------------------------------------------------------------------------
163 //--------------------------------------------------------------------------------------------------
164 typedef struct le_mutex* le_mutex_Ref_t;
165 
166 //--------------------------------------------------------------------------------------------------
174 //--------------------------------------------------------------------------------------------------
176 (
177  const char* nameStr
178 );
179 
180 //--------------------------------------------------------------------------------------------------
188 //--------------------------------------------------------------------------------------------------
190 (
191  const char* nameStr
192 );
193 
194 //--------------------------------------------------------------------------------------------------
202 //--------------------------------------------------------------------------------------------------
204 (
205  const char* nameStr
206 );
207 
208 //--------------------------------------------------------------------------------------------------
216 //--------------------------------------------------------------------------------------------------
218 (
219  const char* nameStr
220 );
221 
222 //--------------------------------------------------------------------------------------------------
228 //--------------------------------------------------------------------------------------------------
229 void le_mutex_Delete
230 (
231  le_mutex_Ref_t mutexRef
232 );
233 
234 //--------------------------------------------------------------------------------------------------
240 //--------------------------------------------------------------------------------------------------
241 void le_mutex_Lock
242 (
243  le_mutex_Ref_t mutexRef
244 );
245 
246 //--------------------------------------------------------------------------------------------------
256 //--------------------------------------------------------------------------------------------------
258 (
259  le_mutex_Ref_t mutexRef
260 );
261 
262 //--------------------------------------------------------------------------------------------------
268 //--------------------------------------------------------------------------------------------------
269 void le_mutex_Unlock
270 (
271  le_mutex_Ref_t mutexRef
272 );
273 
274 //--------------------------------------------------------------------------------------------------
294 //--------------------------------------------------------------------------------------------------
295 #define LE_MUTEX_DECLARE_REF(refName) \
296  static le_mutex_Ref_t refName; \
297  static inline void Lock(void) { le_mutex_Lock(refName); } \
298  static inline void Unlock(void) { le_mutex_Unlock(refName); }
299 
300 #endif /* LEGATO_MUTEX_INCLUDE_GUARD */
le_result_t
Definition: le_basics.h:34
struct le_mutex * le_mutex_Ref_t
Definition: le_mutex.h:164
le_mutex_Ref_t le_mutex_CreateRecursive(const char *nameStr)
void le_mutex_Lock(le_mutex_Ref_t mutexRef)
le_result_t le_mutex_TryLock(le_mutex_Ref_t mutexRef)
le_mutex_Ref_t le_mutex_CreateTraceableNonRecursive(const char *nameStr)
le_mutex_Ref_t le_mutex_CreateNonRecursive(const char *nameStr)
le_mutex_Ref_t le_mutex_CreateTraceableRecursive(const char *nameStr)
void le_mutex_Delete(le_mutex_Ref_t mutexRef)
void le_mutex_Unlock(le_mutex_Ref_t mutexRef)