source: rtems/cpukit/libblock/include/rtems/ramdisk.h @ e51bd96

4.104.114.84.95
Last change on this file since e51bd96 was e51bd96, checked in by Joel Sherrill <joel.sherrill@…>, on 02/28/02 at 20:39:54

2002-02-28 Joel Sherrill <joel@…>

  • Submitted by Victor V. Vengerov <vvv@…> 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.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/* ramdisk.c -- RAM disk block device implementation
2 *
3 * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
4 * Author: Victor V. Vengerov <vvv@oktet.ru>
5 *
6 * @(#) $Id$
7 */
8
9#ifndef __RTEMS_LIBBLOCK_RAMDISK_H__
10#define __RTEMS_LIBBLOCK_RAMDISK_H__
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include <rtems.h>
17
18#include "rtems/blkdev.h"
19
20/* RAM disk configuration table entry */
21typedef struct rtems_ramdisk_config {
22    int   block_size; /* RAM disk block size */
23    int   block_num;  /* Number of blocks on this RAM disk */
24    void *location;   /* RAM disk permanent location (out of RTEMS controlled
25                         memory), or NULL if RAM disk memory should be
26                         allocated dynamically */
27} rtems_ramdisk_config;
28
29/* If application want to use RAM disk, it should specify configuration of
30 * available RAM disks.
31 * The following is definitions for RAM disk configuration table
32 */
33extern rtems_ramdisk_config rtems_ramdisk_configuration[];
34extern int rtems_ramdisk_configuration_size;
35
36/* ramdisk_initialize --
37 *     RAM disk driver initialization entry point.
38 */
39rtems_device_driver
40ramdisk_initialize(
41    rtems_device_major_number major,
42    rtems_device_minor_number minor,
43    void *arg);
44
45#define RAMDISK_DRIVER_TABLE_ENTRY \
46    { ramdisk_initialize, GENERIC_BLOCK_DEVICE_DRIVER_ENTRIES }
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif
Note: See TracBrowser for help on using the repository browser.