summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-23 11:39:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-29 12:25:34 +0200
commit847ad441cda2466680107b0b7607a8ceca3b17d4 (patch)
treed7ac7a11acd1c73faa39f250b54d08e96d21fedb /cpukit/libcsupport/include/rtems/libio.h
parentshell/lsof: Use fprintf() instead of printk() (diff)
downloadrtems-847ad441cda2466680107b0b7607a8ceca3b17d4.tar.bz2
Filesystem: Wait for unmount() to finish
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio.h')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index b59ec0fb54..fe391d9044 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1459,6 +1459,13 @@ struct rtems_filesystem_mount_table_entry_tt {
* string.
*/
char *dev;
+
+ /**
+ * The task that initiated the unmount process. After unmount process
+ * completion this task will be notified via the
+ * @ref RTEMS_FILESYSTEM_UNMOUNT_EVENT.
+ */
+ rtems_id unmount_task;
};
/**
@@ -1513,9 +1520,18 @@ int rtems_filesystem_unregister(
/**
* @brief Unmounts the file system at @a mount_path.
*
- * @todo Due to file system implementation shortcomings it is possible to
- * unmount file systems in use. This likely leads to heap corruption. Unmount
- * only file systems which are not in use by the application.
+ * The function waits for the unmount process completion. In case the calling
+ * thread uses resources of the unmounted file system the function may never
+ * return. In case the calling thread has its root or current directory in the
+ * 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.
+ *
+ * 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.