summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-28 11:17:36 +0000
committerChris Johns <chrisj@rtems.org>2009-04-28 11:17:36 +0000
commit8c44190a9189f7b750fc58ae07e98fe84f569f40 (patch)
tree18ae12b815789d91af30cd5552a4b3f84d3d2dd6 /cpukit/libblock
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-8c44190a9189f7b750fc58ae07e98fe84f569f40.tar.bz2
2009-04-28 Chris Johns <chrisj@rtems.org>
* libblock/src/bdbuf.c: Flush the transfer sync event before blocking in a read.
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/bdbuf.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 48751b34f9..3d57a3c3b8 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -1639,9 +1639,17 @@ rtems_bdbuf_read (dev_t device,
* enabled and the pool unlocked. This is a change to the previous version
* of the bdbuf code.
*/
- int result;
- uint32_t b;
-
+ rtems_event_set out;
+ int result;
+ uint32_t b;
+
+ /*
+ * Flush any events.
+ */
+ rtems_event_receive (RTEMS_BDBUF_TRANSFER_SYNC,
+ RTEMS_EVENT_ALL | RTEMS_NO_WAIT,
+ 0, &out);
+
rtems_bdbuf_unlock_pool (pool);
req->req = RTEMS_BLKDEV_REQ_READ;
@@ -1665,7 +1673,7 @@ rtems_bdbuf_read (dev_t device,
else
{
rtems_status_code sc;
- rtems_event_set out;
+
sc = rtems_event_receive (RTEMS_BDBUF_TRANSFER_SYNC,
RTEMS_EVENT_ALL | RTEMS_WAIT,
0, &out);