Rd


Files

file  rd.c
 Initial RAM disk for HelenOS.

Defines

#define NAME   "rd"

Functions

int main (int argc, char **argv)
static void rd_connection (ipc_callid_t iid, ipc_call_t *icall)
 Handle one connection to ramdisk.
static bool rd_init (void)
 Prepare the ramdisk image for operation.
static int rd_read_blocks (uint64_t ba, size_t cnt, void *buf)
 Read blocks from the device.
static int rd_write_blocks (uint64_t ba, size_t cnt, const void *buf)
 Write blocks to the device.

Variables

static const size_t block_size = 512
 Block size.
static void * rd_addr
 Pointer to the ramdisk's image.
fibril_rwlock_t rd_lock
 This rwlock protects the ramdisk's data.
static size_t rd_size
 Size of the ramdisk.

Function Documentation

static void rd_connection ( ipc_callid_t  iid,
ipc_call_t icall 
) [static]

Handle one connection to ramdisk.

Parameters:
iid Hash of the request that opened the connection.
icall Call data of the request that opened the connection.

Definition at line 86 of file rd.c.


Variable Documentation

fibril_rwlock_t rd_lock

This rwlock protects the ramdisk's data.

If we were to serve multiple requests (read + write or several writes) concurrently (i.e. from two or more threads), each read and write needs to be protected by this rwlock.

Definition at line 79 of file rd.c.


Generated on Thu Jun 2 07:45:58 2011 for HelenOS/USB by  doxygen 1.4.7