diff options
Diffstat (limited to 'cpukit/include/rtems')
-rwxr-xr-x | cpukit/include/rtems/confdefs.h | 9 | ||||
-rw-r--r-- | cpukit/include/rtems/rfs/rtems-rfs-mutex.h | 25 |
2 files changed, 5 insertions, 29 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index f988ea9592..212b46cd42 100755 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -427,14 +427,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \ defined(CONFIGURE_FILESYSTEM_RFS) #include <rtems/rtems-rfs.h> - #if !defined(CONFIGURE_MAXIMUM_RFS_MOUNTS) - #define CONFIGURE_MAXIMUM_RFS_MOUNTS 1 - #endif #define CONFIGURE_FILESYSTEM_ENTRY_RFS \ { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise } - #define _CONFIGURE_SEMAPHORES_FOR_RFS CONFIGURE_MAXIMUM_RFS_MOUNTS -#else - #define _CONFIGURE_SEMAPHORES_FOR_RFS 0 #endif /** @@ -453,8 +447,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; */ #define _CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS \ (_CONFIGURE_SEMAPHORES_FOR_FIFOS + \ - _CONFIGURE_SEMAPHORES_FOR_NFS + \ - _CONFIGURE_SEMAPHORES_FOR_RFS) + _CONFIGURE_SEMAPHORES_FOR_NFS) #ifdef CONFIGURE_INIT diff --git a/cpukit/include/rtems/rfs/rtems-rfs-mutex.h b/cpukit/include/rtems/rfs/rtems-rfs-mutex.h index 606fd53233..57b58e507e 100644 --- a/cpukit/include/rtems/rfs/rtems-rfs-mutex.h +++ b/cpukit/include/rtems/rfs/rtems-rfs-mutex.h @@ -29,13 +29,14 @@ #if __rtems__ #include <rtems.h> #include <rtems/error.h> +#include <rtems/thread.h> #endif /** * RFS Mutex type. */ #if __rtems__ -typedef rtems_id rtems_rfs_mutex; +typedef rtems_recursive_mutex rtems_rfs_mutex; #else typedef uint32_t rtems_rfs_mutex; /* place holder */ #endif @@ -73,16 +74,7 @@ static inline int rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex) { #if __rtems__ - rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0); - if (sc != RTEMS_SUCCESSFUL) - { -#if RTEMS_RFS_TRACE - if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX)) - printf ("rtems-rfs: mutex: obtain failed: %s\n", - rtems_status_text (sc)); -#endif - return EIO; - } + rtems_recursive_mutex_lock(mutex); #endif return 0; } @@ -99,16 +91,7 @@ static inline int rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex) { #if __rtems__ - rtems_status_code sc = rtems_semaphore_release (*mutex); - if (sc != RTEMS_SUCCESSFUL) - { -#if RTEMS_RFS_TRACE - if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX)) - printf ("rtems-rfs: mutex: release failed: %s\n", - rtems_status_text (sc)); -#endif - return EIO; - } + rtems_recursive_mutex_unlock(mutex); #endif return 0; } |