[rtems commit] libblock: Remove superfluous volatile qualifier
Joel Sherrill
joel at rtems.org
Thu Mar 29 14:14:30 UTC 2012
Module: rtems
Branch: master
Commit: 27ca97f397a30cc72e26957df345bb5be55e2730
Changeset: http://git.rtems.org/rtems/commit/?id=27ca97f397a30cc72e26957df345bb5be55e2730
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Feb 28 15:59:04 2012 +0100
libblock: Remove superfluous volatile qualifier
All these variables are protected by the bdbuf cache mutex.
---
cpukit/libblock/include/rtems/bdbuf.h | 6 +++---
cpukit/libblock/src/bdbuf.c | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h
index 33db50a..11b4132 100644
--- a/cpukit/libblock/include/rtems/bdbuf.h
+++ b/cpukit/libblock/include/rtems/bdbuf.h
@@ -321,13 +321,13 @@ typedef struct rtems_bdbuf_buffer
unsigned char* buffer; /**< Pointer to the buffer memory area */
- volatile rtems_bdbuf_buf_state state; /**< State of the buffer. */
+ rtems_bdbuf_buf_state state; /**< State of the buffer. */
- volatile uint32_t waiters; /**< The number of threads waiting on this
+ uint32_t waiters; /**< The number of threads waiting on this
* buffer. */
rtems_bdbuf_group* group; /**< Pointer to the group of BDs this BD is
* part of. */
- volatile uint32_t hold_timer; /**< Timer to indicate how long a buffer
+ uint32_t hold_timer; /**< Timer to indicate how long a buffer
* has been held in the cache modified. */
int references; /**< Allow reference counting by owner. */
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 3a1196c..53782e8 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -74,7 +74,7 @@ typedef struct rtems_bdbuf_swapout_worker
* idle. */
rtems_id id; /**< The id of the task so we can wake
* it. */
- volatile bool enabled; /**< The worker is enabled. */
+ bool enabled; /**< The worker is enabled. */
rtems_bdbuf_swapout_transfer transfer; /**< The transfer data for this
* thread. */
} rtems_bdbuf_swapout_worker;
@@ -83,7 +83,7 @@ typedef struct rtems_bdbuf_swapout_worker
* Buffer waiters synchronization.
*/
typedef struct rtems_bdbuf_waiters {
- volatile unsigned count;
+ unsigned count;
rtems_id sema;
} rtems_bdbuf_waiters;
@@ -93,7 +93,7 @@ typedef struct rtems_bdbuf_waiters {
typedef struct rtems_bdbuf_cache
{
rtems_id swapout; /**< Swapout task ID */
- volatile bool swapout_enabled; /**< Swapout is only running if
+ bool swapout_enabled; /**< Swapout is only running if
* enabled. Set to false to kill the
* swap out task. It deletes itself. */
rtems_chain_control swapout_workers; /**< The work threads for the swapout
@@ -111,9 +111,9 @@ typedef struct rtems_bdbuf_cache
rtems_id lock; /**< The cache lock. It locks all
* cache data, BD and lists. */
rtems_id sync_lock; /**< Sync calls block writes. */
- volatile bool sync_active; /**< True if a sync is active. */
- volatile rtems_id sync_requester; /**< The sync requester. */
- volatile dev_t sync_device; /**< The device to sync and
+ bool sync_active; /**< True if a sync is active. */
+ rtems_id sync_requester; /**< The sync requester. */
+ dev_t sync_device; /**< The device to sync and
* BDBUF_INVALID_DEV not a device
* sync. */
More information about the vc
mailing list