From cf1c3953decff9dae33c6c13e7869e0e72f5c087 Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Tue, 21 Feb 2012 12:56:51 +0100
Subject: [PATCH] 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
|
b
|
|
24 | 24 | #if __rtems__ |
25 | 25 | /** |
26 | 26 | * RTEMS_RFS Mutex Attributes |
27 | | * |
28 | | * @warning Do not configure as inherit priority. If a driver is in the driver |
29 | | * initialisation table this locked semaphore will have the IDLE task |
30 | | * as the holder and a blocking task will raise the priority of the |
31 | | * IDLE task which can cause unsual side effects like not work. |
32 | 27 | */ |
33 | 28 | #define RTEMS_RFS_MUTEX_ATTRIBS \ |
34 | | (RTEMS_PRIORITY | RTEMS_SIMPLE_BINARY_SEMAPHORE | \ |
35 | | RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL) |
| 29 | (RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | \ |
| 30 | RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL) |
36 | 31 | #endif |
37 | 32 | |
38 | 33 | int |