12 #ifndef _RTEMS_RAMDISK_H 13 #define _RTEMS_RAMDISK_H 77 rtems_device_major_number major,
78 rtems_device_minor_number minor,
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,
191 void ramdisk_free(
ramdisk *rd);
193 static inline void ramdisk_enable_free_at_delete_request(
ramdisk *rd)
210 uint32_t media_block_size,
bool initialized
RAM disk is initialized.
Definition: ramdisk.h:122
uint32_t rtems_blkdev_bnum
Block device block index type.
Definition: diskdevs.h:45
uint32_t block_size
RAM disk block size.
Definition: ramdisk.h:43
RAM disk configuration table entry.
Definition: ramdisk.h:39
rtems_ramdisk_config rtems_ramdisk_configuration[]
External reference to the RAM disk configuration table describing each RAM disk in the system...
RAM disk descriptor.
Definition: ramdisk.h:103
struct rtems_ramdisk_config rtems_ramdisk_config
RAM disk configuration table entry.
Description of a disk device (logical and physical disks).
Definition: diskdevs.h:157
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:32
rtems_blkdev_bnum block_num
Number of blocks on this RAM disk.
Definition: ramdisk.h:112
struct ramdisk ramdisk
RAM disk descriptor.
bool free_at_delete_request
Free the RAM disk at the block device delete request.
Definition: ramdisk.h:137
rtems_status_code
Classic API Status.
Definition: status.h:43
void * location
RAM disk location or NULL if RAM disk memory should be allocated dynamically.
Definition: ramdisk.h:54
void * area
RAM disk memory area.
Definition: ramdisk.h:117
rtems_blkdev_bnum block_num
Number of blocks on this RAM disk.
Definition: ramdisk.h:48
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:29
bool trace
Trace enable.
Definition: ramdisk.h:132
uint32_t block_size
RAM disk block size, the media size.
Definition: ramdisk.h:107
bool malloced
Indicates if memory is allocated by malloc() for this RAM disk.
Definition: ramdisk.h:127
size_t rtems_ramdisk_configuration_size
External reference the size of the RAM disk configuration table rtems_ramdisk_configuration.
rtems_device_driver ramdisk_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
RAM disk driver initialization entry point.