Main Page   Compound List   File List   Compound Members   File Members  

disk.cc File Reference

#include "copyright.h"
#include "disk.h"
#include "system.h"

Go to the source code of this file.

Defines

#define MagicNumber   0x456789ab
#define MagicSize   sizeof(int)
#define DiskSize   (MagicSize + (NumSectors * SectorSize))

Functions

void DiskDone (int arg)
void PrintSector (bool writing, int sector, char *data)


Define Documentation

#define DiskSize   (MagicSize + (NumSectors * SectorSize))
 

Definition at line 26 of file disk.cc.

Referenced by Disk::Disk.

#define MagicNumber   0x456789ab
 

Definition at line 23 of file disk.cc.

Referenced by Disk::Disk.

#define MagicSize   sizeof(int)
 

Definition at line 24 of file disk.cc.

Referenced by Disk::Disk, Disk::ReadRequest, and Disk::WriteRequest.


Function Documentation

void DiskDone int    arg [static]
 

Definition at line 29 of file disk.cc.

Referenced by Disk::ReadRequest, and Disk::WriteRequest.

00029 { ((Disk *)arg)->HandleInterrupt(); }

void PrintSector bool    writing,
int    sector,
char *    data
[static]
 

Definition at line 87 of file disk.cc.

References SectorSize.

Referenced by Disk::ReadRequest, and Disk::WriteRequest.

00088 {
00089     int *p = (int *) data;
00090 
00091     if (writing)
00092         printf("Writing sector: %d\n", sector); 
00093     else
00094         printf("Reading sector: %d\n", sector); 
00095     for (unsigned int i = 0; i < (SectorSize/sizeof(int)); i++)
00096         printf("%x ", p[i]);
00097     printf("\n"); 
00098 }


Generated on Mon Feb 10 09:54:49 2003 for nachos by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees