#include "udanax.h"
Include dependency graph for cashedisk.cxx:

Go to the source code of this file.
Classes | |
| struct | hashfoo |
Defines | |
| #define | HASHSIZE 301 |
| #define | HASHMULT 754343 |
Typedefs | |
| typedef hashfoo | hashtable |
Functions | |
| void | inithash () |
| ??? | |
| void | actuallyreadrawloaffromhash (typeuberrawdiskloaf *loafptr, int blocknumber) |
| ??? | |
| void | writethruhash (typeuberrawdiskloaf *loafptr, int blocknumber) |
| ??? | |
| void | hashcasheclash () |
| ??? | |
| int | blockisinhash (int blocknumber) |
| ??? | |
| void | addtohash (typeuberrawdiskloaf *loafptr, int blocknumber) |
| ??? | |
| int | hash (int blocknumber) |
| ??? | |
Variables | |
| hashtable | xhashtable [HASHSIZE] |
(to be defined)
Definition in file cashedisk.cxx.
|
|
Definition at line 66 of file cashedisk.cxx. Referenced by hash(). |
|
|
Definition at line 65 of file cashedisk.cxx. Referenced by hash(), and inithash(). |
|
|
|
|
||||||||||||
|
??? (to be defined) Definition at line 98 of file cashedisk.cxx. References actuallyreadrawloaf(), addtohash(), blockisinhash(), hashfoo::urdloaf, and xhashtable.
00101 {
00102 int temp;
00103 void addtohash(), actuallyreadrawloaf();
00104
00105 /* L("actuallyreadrawloaffromhash %d \n",blocknumber); */
00106 if (temp = blockisinhash(blocknumber)) {
00107 *loafptr = xhashtable[temp].urdloaf;
00108 return;
00109 }
00110 actuallyreadrawloaf(loafptr, blocknumber);
00111 addtohash(loafptr, blocknumber);
00112
00113 }
|
|
||||||||||||
|
??? (to be defined) Definition at line 176 of file cashedisk.cxx. References hashfoo::blocknumber, hash(), hashcasheclash(), hashfoo::urdloaf, and xhashtable. Referenced by actuallyreadrawloaffromhash(), and writethruhash().
00179 {
00180 int temp = hash(blocknumber);
00181
00182 if (xhashtable[temp].blocknumber != -1)
00183 hashcasheclash();
00184
00185 xhashtable[temp].blocknumber = blocknumber;
00186 xhashtable[temp].urdloaf = *loafptr;
00187 }
|
|
|
??? (to be defined) Definition at line 157 of file cashedisk.cxx. References hashfoo::blocknumber, hash(), and xhashtable. Referenced by actuallyreadrawloaffromhash(), and writethruhash().
00159 {
00160 int temp = hash(blocknumber);
00161
00162 if (xhashtable[temp].blocknumber == blocknumber)
00163 return temp;
00164 else
00165 return 0;
00166 }
|
|
|
??? (to be defined) Definition at line 197 of file cashedisk.cxx. References HASHMULT, and HASHSIZE. Referenced by addtohash(), addtoopen(), blockisinhash(), and removefromopen().
00199 {
00200 return abs(blocknumber * HASHMULT) % HASHSIZE;
00201 }
|
|
|
??? (to be defined) Definition at line 145 of file cashedisk.cxx. Referenced by addtohash().
00146 {
00147 }
|
|
|
??? (to be defined) Definition at line 83 of file cashedisk.cxx. References hashfoo::blocknumber, HASHSIZE, and xhashtable.
00084 {
00085 int i;
00086 for (i = 0; i < HASHSIZE; i++)
00087 xhashtable[i].blocknumber = -1;
00088 }
|
|
||||||||||||
|
??? (to be defined) Definition at line 123 of file cashedisk.cxx. References addtohash(), blockisinhash(), hashfoo::urdloaf, and xhashtable.
00126 {
00127 int temp;
00128 void addtohash();
00129
00130 if (temp = blockisinhash(blocknumber)) {
00131 xhashtable[temp].urdloaf = *loafptr;
00132 } else {
00133 addtohash(loafptr, blocknumber);
00134 }
00135 }
|
|
|
Definition at line 73 of file cashedisk.cxx. Referenced by actuallyreadrawloaffromhash(), addtohash(), blockisinhash(), inithash(), and writethruhash(). |
1.3.4