summaryrefslogtreecommitdiff
path: root/nuttx/fs/mmap/fs_rammap.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-08 00:20:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-08 00:20:44 +0000
commit0a30a23cf0bb5a2abf1f02c5f120641e75067fae (patch)
treeec08393efc9f0fd5ea4e76202b280575500fde42 /nuttx/fs/mmap/fs_rammap.h
parent77f5bc2c9f37c3e15e1ea07f0954d61c65210e6a (diff)
downloadpx4-nuttx-0a30a23cf0bb5a2abf1f02c5f120641e75067fae.tar.gz
px4-nuttx-0a30a23cf0bb5a2abf1f02c5f120641e75067fae.tar.bz2
px4-nuttx-0a30a23cf0bb5a2abf1f02c5f120641e75067fae.zip
More RAM mapping logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3577 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/mmap/fs_rammap.h')
-rw-r--r--nuttx/fs/mmap/fs_rammap.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/fs/mmap/fs_rammap.h b/nuttx/fs/mmap/fs_rammap.h
index c8eba76b6..db19f215c 100644
--- a/nuttx/fs/mmap/fs_rammap.h
+++ b/nuttx/fs/mmap/fs_rammap.h
@@ -44,6 +44,9 @@
#include <nuttx/config.h>
+#include <sys/types.h>
+#include <semaphore.h>
+
#ifdef CONFIG_FS_RAMMAP
/****************************************************************************
@@ -68,12 +71,28 @@
struct fs_rammap_s
{
+ struct fs_rammap_s *flink; /* Implements a singly linked list */
+ FAR void *addr; /* Start of allocated memory */
+ size_t length; /* Length of region */
+ off_t offset; /* File offset */
+};
+
+/* This structure defines all "mapped" files */
+
+struct fs_allmaps_s
+{
+ sem_t exclsem; /* Provides exclusive access the list */
+ struct fs_rammap_s *maps; /* List of mapped files */
};
/****************************************************************************
* Public Variables
****************************************************************************/
+/* This is the list of all mapped files */
+
+extern struct fs_allmaps_s g_rammaps;
+
/****************************************************************************
* Public Function Prototypes
****************************************************************************/