diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-30 17:20:16 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-30 18:03:29 +0100 |
commit | 93b29f08f0a62e5dd89498b58b569ac78a06271b (patch) | |
tree | c025e58266ed26e207a78829fc5762aa693e7f38 | |
parent | libblock: Use transient event (diff) | |
download | rtems-93b29f08f0a62e5dd89498b58b569ac78a06271b.tar.bz2 |
Filesystem: Use transient event
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 12 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio_.h | 10 | ||||
-rw-r--r-- | cpukit/libcsupport/src/sup_fs_location.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/unmount.c | 9 |
4 files changed, 11 insertions, 22 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index fe391d9044..9374f3ac1a 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -1462,8 +1462,9 @@ struct rtems_filesystem_mount_table_entry_tt { /** * The task that initiated the unmount process. After unmount process - * completion this task will be notified via the - * @ref RTEMS_FILESYSTEM_UNMOUNT_EVENT. + * completion this task will be notified via the transient event. + * + * @see ClassicEventTransient. */ rtems_id unmount_task; }; @@ -1526,15 +1527,16 @@ int rtems_filesystem_unregister( * unmounted file system the function returns with an error status and errno is * set to EBUSY. * - * The unmount process completion notification uses the RTEMS classic API - * event @ref RTEMS_FILESYSTEM_UNMOUNT_EVENT. It is a fatal error to terminate - * the calling thread while waiting for this event. + * The unmount process completion notification uses the transient event. It is + * a fatal error to terminate the calling thread while waiting for this event. * * A concurrent unmount request for the same file system instance has * unpredictable effects. * * @retval 0 Successful operation. * @retval -1 An error occured. The @c errno indicates the error. + * + * @see ClassicEventTransient. */ int unmount( const char *mount_path diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h index f2791a0a61..4f7a432e9a 100644 --- a/cpukit/libcsupport/include/rtems/libio_.h +++ b/cpukit/libcsupport/include/rtems/libio_.h @@ -38,16 +38,6 @@ extern "C" { #define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O') #define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n) -/** - * @brief Event to signal an unmount process completion. - * - * This event should equal the RTEMS_BDBUF_TRANSFER_SYNC event to avoid too - * many events reserved for the file system. - * - * @see rtems_filesystem_do_unmount() and unmount(). - */ -#define RTEMS_FILESYSTEM_UNMOUNT_EVENT RTEMS_EVENT_1 - extern rtems_id rtems_libio_semaphore; /* diff --git a/cpukit/libcsupport/src/sup_fs_location.c b/cpukit/libcsupport/src/sup_fs_location.c index f991024762..8bf0374323 100644 --- a/cpukit/libcsupport/src/sup_fs_location.c +++ b/cpukit/libcsupport/src/sup_fs_location.c @@ -216,7 +216,7 @@ void rtems_filesystem_do_unmount( if (mt_entry->unmount_task != 0) { rtems_status_code sc = - rtems_event_send(mt_entry->unmount_task, RTEMS_FILESYSTEM_UNMOUNT_EVENT); + rtems_event_transient_send(mt_entry->unmount_task); if (sc != RTEMS_SUCCESSFUL) { rtems_fatal_error_occurred(0xdeadbeef); } diff --git a/cpukit/libcsupport/src/unmount.c b/cpukit/libcsupport/src/unmount.c index b888dee240..a6e0f40442 100644 --- a/cpukit/libcsupport/src/unmount.c +++ b/cpukit/libcsupport/src/unmount.c @@ -70,12 +70,9 @@ int unmount( const char *path ) rtems_filesystem_eval_path_cleanup( &ctx ); if ( rv == 0 ) { - rtems_event_set out; - rtems_status_code sc = rtems_event_receive( - RTEMS_FILESYSTEM_UNMOUNT_EVENT, - RTEMS_EVENT_ALL | RTEMS_WAIT, - RTEMS_NO_TIMEOUT, - &out + rtems_status_code sc = rtems_event_transient_receive( + RTEMS_WAIT, + RTEMS_NO_TIMEOUT ); if ( sc != RTEMS_SUCCESSFUL ) { |