source: rtems/cpukit/libblock/include/rtems/ramdisk.h @ 90b2c072

4.104.114.95
Last change on this file since 90b2c072 was 90b2c072, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/07/08 at 18:06:27

Use "#include <..>" to include public headers.

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