[rtems commit] Filesystem: Use transient event
Sebastian Huber
sebh at rtems.org
Tue Oct 30 17:00:08 UTC 2012
Module: rtems
Branch: master
Commit: 93b29f08f0a62e5dd89498b58b569ac78a06271b
Changeset: http://git.rtems.org/rtems/commit/?id=93b29f08f0a62e5dd89498b58b569ac78a06271b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Oct 30 17:20:16 2012 +0100
Filesystem: Use transient event
---
cpukit/libcsupport/include/rtems/libio.h | 12 +++++++-----
cpukit/libcsupport/include/rtems/libio_.h | 10 ----------
cpukit/libcsupport/src/sup_fs_location.c | 2 +-
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 fe391d9..9374f3a 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 f2791a0..4f7a432 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 f991024..8bf0374 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 b888dee..a6e0f40 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 ) {
More information about the vc
mailing list