RTEMS  5.0.0
rtems-rfs-mutex.h
Go to the documentation of this file.
1 
14 /*
15  * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #if !defined (_RTEMS_RFS_MUTEX_H_)
23 #define _RTEMS_RFS_MUTEX_H_
24 
25 #include <errno.h>
26 
28 
29 #if __rtems__
30 #include <rtems.h>
31 #include <rtems/error.h>
32 #include <rtems/thread.h>
33 #endif
34 
38 #if __rtems__
39 typedef rtems_recursive_mutex rtems_rfs_mutex;
40 #else
41 typedef uint32_t rtems_rfs_mutex; /* place holder */
42 #endif
43 
54 
64 
73 static inline int
74 rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
75 {
76 #if __rtems__
77  rtems_recursive_mutex_lock(mutex);
78 #endif
79  return 0;
80 }
81 
90 static inline int
91 rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
92 {
93 #if __rtems__
94  rtems_recursive_mutex_unlock(mutex);
95 #endif
96  return 0;
97 }
98 
99 #endif
int rtems_rfs_mutex_create(rtems_rfs_mutex *mutex)
Create the mutex.
Definition: rtems-rfs-mutex.c:22
uint32_t rtems_rfs_mutex
Definition: rtems-rfs-mutex.h:41
RTEMS Error Reporting.
Manages the Trace and Debugging Features of the RTEMS RFS File System.
int rtems_rfs_mutex_destroy(rtems_rfs_mutex *mutex)
Destroy the mutex.
Definition: rtems-rfs-mutex.c:31
Definition: mutex.h:4