[rtems commit] PR 2026/filesystem - Fix semaphore attributes

Sebastian Huber sebh at rtems.org
Thu Feb 23 10:41:23 UTC 2012


Module:    rtems
Branch:    master
Commit:    a4097fdb2f0bab0fabb69461ff58194908f91e89
Changeset: http://git.rtems.org/rtems/commit/?id=a4097fdb2f0bab0fabb69461ff58194908f91e89

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 21 12:56:51 2012 +0100

PR 2026/filesystem - Fix semaphore attributes

Semaphores of type RTEMS_SIMPLE_BINARY_SEMAPHORE are not suitable for a
mutex.  Use RTEMS_BINARY_SEMAPHORE with RTEMS_INHERIT_PRIORITY instead.

---

 cpukit/libfs/src/rfs/rtems-rfs-mutex.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
index 04d700a..f35350f 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
@@ -24,15 +24,10 @@
 #if __rtems__
 /**
  * RTEMS_RFS Mutex Attributes
- *
- * @warning Do not configure as inherit priority. If a driver is in the driver
- *          initialisation table this locked semaphore will have the IDLE task
- *          as the holder and a blocking task will raise the priority of the
- *          IDLE task which can cause unsual side effects like not work.
  */
 #define RTEMS_RFS_MUTEX_ATTRIBS \
-  (RTEMS_PRIORITY | RTEMS_SIMPLE_BINARY_SEMAPHORE | \
-   RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
+  (RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | \
+   RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
 #endif
 
 int




More information about the vc mailing list