TMPFS update

This commit is contained in:
Gregory Nutt
2015-10-08 14:21:12 -06:00
parent cc35c0c49d
commit 1e6ffe7677
3 changed files with 291 additions and 57 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -137,9 +137,9 @@ struct tmpfs_s
{
/* The root directory */
FAR struct tmpfs_directory_s *r_root;
FAR struct tmpfs_directory_s *tfs_root;
sem_t r_exclsem; /* Supports exclusive access to the file system */
sem_t tfs_exclsem; /* Supports exclusive access to the file system */
};
/****************************************************************************

View File

@@ -102,6 +102,19 @@ struct fs_romfsdir_s
};
#endif /* CONFIG_FS_ROMFS */
#ifdef CONFIG_FS_TMPFS
/* For TMPFS, we need the directory object and an index into the directory
* entries.
*/
struct tmpfs_directory_s; /* Forward reference */
struct fs_tmpfsdir_s
{
FAR struct tmpfs_directory_s *tf_tdo; /* Directory being enumerated */
unsigned int tf_index; /* Directory index */
};
#endif /* CONFIG_FS_TMPFS */
#ifdef CONFIG_FS_BINFS
/* The apps/ pseudo bin/ directory. The state value is simply an index */
@@ -209,6 +222,9 @@ struct fs_dirent_s
#ifdef CONFIG_FS_ROMFS
struct fs_romfsdir_s romfs;
#endif
#ifdef CONFIG_FS_TMPFS
struct fs_tmpfsdir_s tmpfs;
#endif
#ifdef CONFIG_FS_BINFS
struct fs_binfsdir_s binfs;
#endif