StuBS
Ramdisk Class Reference
Inheritance diagram for Ramdisk:
[legend]
Collaboration diagram for Ramdisk:
[legend]

Public Member Functions

 Ramdisk (void *buf, size_t size)
 
Block fix (uint64_t block_number)
 
void unfix (Block *block)
 
int sync ()
 
int sync (Block *block)
 
- Public Member Functions inherited from BlockDevice
virtual Block fix (uint64_t block_number)=0
 
virtual void unfix (Block *block)=0
 
virtual int sync (Block *block)=0
 
virtual int sync ()=0
 
bool set_blocksize (unsigned int blocksize)
 
template<typename T >
divide_by_blocksize (T val) const
 
template<typename T >
modulo_blocksize (T val) const
 

Additional Inherited Members

- Public Attributes inherited from BlockDevice
unsigned int blocksize
 
unsigned int blocksize_bits
 

Member Function Documentation

◆ fix()

Block Ramdisk::fix ( uint64_t  block_number)
virtual

Implements BlockDevice.

◆ unfix()

void Ramdisk::unfix ( Block block)
virtual

Implements BlockDevice.

◆ sync() [1/2]

int Ramdisk::sync ( )
virtual

Implements BlockDevice.

◆ sync() [2/2]

int Ramdisk::sync ( Block block)
virtual

Implements BlockDevice.


The documentation for this class was generated from the following files: