summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libblock/include/rtems/ramdisk.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-28 20:39:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-28 20:39:54 +0000
commite51bd967cda1989d606b5b6178ed6d2c8d151707 (patch)
tree09f95b89a25c51e6e9f711afca3878f0e0bab251 /c/src/exec/libblock/include/rtems/ramdisk.h
parent2002-02-27 Ilya Alexeev <ilya@continuum.ru> (diff)
downloadrtems-e51bd967cda1989d606b5b6178ed6d2c8d151707.tar.bz2
2002-02-28 Joel Sherrill <joel@OARcorp.com>
* Submitted by Victor V. Vengerov <vvv@oktet.ru> and merged into the RTEMS source. * ChangeLog, Makefile.am, README, configure.ac, include/Makefile.am, include/rtems/bdbuf.h, include/rtems/blkdev.h, include/rtems/diskdevs.h, include/rtems/ramdisk.h, include/rtems/.cvsignore, include/.cvsignore, src/Makefile.am, src/bdbuf.c, src/blkdev.c, src/diskdevs.c, src/ramdisk.c, src/.cvsignore, .cvsignore: New files.
Diffstat (limited to '')
-rw-r--r--c/src/exec/libblock/include/rtems/ramdisk.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/c/src/exec/libblock/include/rtems/ramdisk.h b/c/src/exec/libblock/include/rtems/ramdisk.h
new file mode 100644
index 0000000000..b9e8c238b8
--- /dev/null
+++ b/c/src/exec/libblock/include/rtems/ramdisk.h
@@ -0,0 +1,52 @@
+/* ramdisk.c -- RAM disk block device implementation
+ *
+ * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
+ * Author: Victor V. Vengerov <vvv@oktet.ru>
+ *
+ * @(#) $Id$
+ */
+
+#ifndef __RTEMS_LIBBLOCK_RAMDISK_H__
+#define __RTEMS_LIBBLOCK_RAMDISK_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems.h>
+
+#include "rtems/blkdev.h"
+
+/* RAM disk configuration table entry */
+typedef struct rtems_ramdisk_config {
+ int block_size; /* RAM disk block size */
+ int block_num; /* Number of blocks on this RAM disk */
+ void *location; /* RAM disk permanent location (out of RTEMS controlled
+ memory), or NULL if RAM disk memory should be
+ allocated dynamically */
+} rtems_ramdisk_config;
+
+/* If application want to use RAM disk, it should specify configuration of
+ * available RAM disks.
+ * The following is definitions for RAM disk configuration table
+ */
+extern rtems_ramdisk_config rtems_ramdisk_configuration[];
+extern int rtems_ramdisk_configuration_size;
+
+/* ramdisk_initialize --
+ * RAM disk driver initialization entry point.
+ */
+rtems_device_driver
+ramdisk_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg);
+
+#define RAMDISK_DRIVER_TABLE_ENTRY \
+ { ramdisk_initialize, GENERIC_BLOCK_DEVICE_DRIVER_ENTRIES }
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif