Changeset ee82825d in rtems for cpukit/libblock


Ignore:
Timestamp:
Oct 24, 2012, 4:10:02 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
93b29f0
Parents:
0edf263
git-author:
Sebastian Huber <sebastian.huber@…> (10/24/12 16:10:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/30/12 17:03:29)
Message:

libblock: Use transient event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    r0edf263 ree82825d  
    182182#define RTEMS_BLKDEV_FATAL_BDBUF_STATE_2       RTEMS_BLKDEV_FATAL_ERROR(30)
    183183#define RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP    RTEMS_BLKDEV_FATAL_ERROR(31)
     184#define RTEMS_BLKDEV_FATAL_BDBUF_WAIT_TRANS_EVNT RTEMS_BLKDEV_FATAL_ERROR(32)
    184185
    185186/**
     
    187188 * application events.
    188189 */
    189 #define RTEMS_BDBUF_TRANSFER_SYNC  RTEMS_EVENT_1
    190190#define RTEMS_BDBUF_SWAPOUT_SYNC   RTEMS_EVENT_2
    191191#define RTEMS_BDBUF_READ_AHEAD_WAKE_UP RTEMS_EVENT_1
     
    15471547  if (sc != RTEMS_SUCCESSFUL || out != event)
    15481548    rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
     1549}
     1550
     1551static void
     1552rtems_bdbuf_wait_for_transient_event (void)
     1553{
     1554  rtems_status_code sc = RTEMS_SUCCESSFUL;
     1555
     1556  sc = rtems_event_transient_receive (RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     1557  if (sc != RTEMS_SUCCESSFUL)
     1558    rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_TRANS_EVNT);
    15491559}
    15501560
     
    18681878  req->status = status;
    18691879
    1870   rtems_event_send (req->io_task, RTEMS_BDBUF_TRANSFER_SYNC);
     1880  rtems_event_transient_send (req->io_task);
    18711881}
    18721882
     
    18891899  if (result == 0)
    18901900  {
    1891     rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
     1901    rtems_bdbuf_wait_for_transient_event ();
    18921902    sc = req->status;
    18931903  }
     
    22692279  rtems_bdbuf_wake_swapper ();
    22702280  rtems_bdbuf_unlock_cache ();
    2271   rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
     2281  rtems_bdbuf_wait_for_transient_event ();
    22722282  rtems_bdbuf_unlock_sync ();
    22732283
     
    26182628    rtems_bdbuf_unlock_cache ();
    26192629    if (sync_requester)
    2620       rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
     2630      rtems_event_transient_send (sync_requester);
    26212631  }
    26222632
Note: See TracChangeset for help on using the changeset viewer.