12#ifndef _RTEMS_RAMDISK_H
13#define _RTEMS_RAMDISK_H
85#define RAMDISK_DRIVER_TABLE_ENTRY \
88 NULL, NULL, NULL, NULL, NULL \
91#define RAMDISK_DEVICE_BASE_NAME "/dev/rd"
186 uint32_t media_block_size,
193static inline void ramdisk_enable_free_at_delete_request(
ramdisk *rd)
210 uint32_t media_block_size,
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_blkdev_bnum
Block device block index type.
Definition: diskdevs.h:45
rtems_status_code ramdisk_register(uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace, const char *disk)
Allocates, initializes and registers a RAM disk.
Definition: ramdisk-register.c:42
rtems_ramdisk_config rtems_ramdisk_configuration[]
External reference to the RAM disk configuration table describing each RAM disk in the system.
ramdisk * ramdisk_allocate(void *area_begin, uint32_t media_block_size, rtems_blkdev_bnum media_block_count, bool trace)
Allocates and initializes a RAM disk descriptor.
Definition: ramdisk-init.c:45
rtems_device_driver ramdisk_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
RAM disk driver initialization entry point.
size_t rtems_ramdisk_configuration_size
External reference the size of the RAM disk configuration table rtems_ramdisk_configuration.
This header file defines the RTEMS Classic API.
RAM disk descriptor.
Definition: ramdisk.h:103
rtems_blkdev_bnum block_num
Number of blocks on this RAM disk.
Definition: ramdisk.h:112
uint32_t block_size
RAM disk block size, the media size.
Definition: ramdisk.h:107
bool initialized
RAM disk is initialized.
Definition: ramdisk.h:122
bool malloced
Indicates if memory is allocated by malloc() for this RAM disk.
Definition: ramdisk.h:127
bool free_at_delete_request
Free the RAM disk at the block device delete request.
Definition: ramdisk.h:137
bool trace
Trace enable.
Definition: ramdisk.h:132
void * area
RAM disk memory area.
Definition: ramdisk.h:117
Description of a disk device (logical and physical disks).
Definition: diskdevs.h:177
RAM disk configuration table entry.
Definition: ramdisk.h:39
void * location
RAM disk location or NULL if RAM disk memory should be allocated dynamically.
Definition: ramdisk.h:54
rtems_blkdev_bnum block_num
Number of blocks on this RAM disk.
Definition: ramdisk.h:48
uint32_t block_size
RAM disk block size.
Definition: ramdisk.h:43