RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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__
39typedef rtems_recursive_mutex rtems_rfs_mutex;
40#else
41typedef uint32_t rtems_rfs_mutex; /* place holder */
42#endif
43
54
64
73static inline int
74rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
75{
76#if __rtems__
77 rtems_recursive_mutex_lock(mutex);
78#endif
79 return 0;
80}
81
90static inline int
91rtems_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
RTEMS Error Reporting.
int rtems_rfs_mutex_create(rtems_rfs_mutex *mutex)
Create the mutex.
Definition: rtems-rfs-mutex.c:23
uint32_t rtems_rfs_mutex
Definition: rtems-rfs-mutex.h:41
int rtems_rfs_mutex_destroy(rtems_rfs_mutex *mutex)
Destroy the mutex.
Definition: rtems-rfs-mutex.c:32
Manages the Trace and Debugging Features of the RTEMS RFS File System.
Definition: mutex.h:4