#include <synchdisk.h>
Inheritance diagram for SynchDisk::

Public Methods | |
| SynchDisk (char *name) | |
| Initialize a synchronous disk, by initializing the raw Disk. More... | |
| ~SynchDisk () | |
| De-allocate the synch disk data. More... | |
| void | ReadSector (int sectorNumber, char *data) |
| Read a disk sector, returning only once the data is actually read . It calls Disk::ReadRequest and then waits until the request is done. More... | |
| void | WriteSector (int sectorNumber, char *data) |
| Write a disk sector, returning only once the data is actually written. It calls Disk::WriteRequest and then waits until the request is done. More... | |
| void | CallBack () |
| Called by the disk device interrupt handler, to signal that the current disk operation is complete. More... | |
Private Attributes | |
| Disk* | disk |
| Raw disk device. More... | |
| Semaphore* | semaphore |
| To synchronize requesting thread with the interrupt handler. More... | |
| Lock* | lock |
| Only one read/write request can be sent to the disk at a time. More... | |
Definition at line 29 of file synchdisk.h.
|
|
Initialize a synchronous disk, by initializing the raw Disk. SynchDisk::SynchDisk Initialize the synchronous interface to the physical disk, in turn initializing the physical disk. "name" -- UNIX file name to be used as storage for the disk data (usually, "DISK") Definition at line 30 of file synchdisk.cc. |
|
|
De-allocate the synch disk data. SynchDisk::~SynchDisk De-allocate data structures needed for the synchronous disk abstraction. Definition at line 43 of file synchdisk.cc. |
|
|
Called by the disk device interrupt handler, to signal that the current disk operation is complete. SynchDisk::CallBack Disk interrupt handler. Wake up any thread waiting for the disk request to finish. Reimplemented from CallBackObj. Definition at line 93 of file synchdisk.cc. |
|
|
Read a disk sector, returning only once the data is actually read . It calls Disk::ReadRequest and then waits until the request is done. SynchDisk::ReadSector Read the contents of a disk sector into a buffer. Return only after the data has been read. "sectorNumber" -- the disk sector to read "data" -- the buffer to hold the contents of the disk sector Definition at line 60 of file synchdisk.cc. |
|
|
Write a disk sector, returning only once the data is actually written. It calls Disk::WriteRequest and then waits until the request is done. SynchDisk::WriteSector Write the contents of a buffer into a disk sector. Return only after the data has been written. "sectorNumber" -- the disk sector to be written "data" -- the new contents of the disk sector Definition at line 78 of file synchdisk.cc. |
|
|
Raw disk device.
Definition at line 54 of file synchdisk.h. |
|
|
Only one read/write request can be sent to the disk at a time.
Definition at line 57 of file synchdisk.h. |
|
|
To synchronize requesting thread with the interrupt handler.
Definition at line 55 of file synchdisk.h. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001