};
/* Prototypes for static routines */
-static struct FileEntry *FindFE(register AFSFid * fid);
+static struct FileEntry *FindFE(AFSFid * fid);
#ifndef INTERPRET_DUMP
-static struct CallBack *iGetCB(register int *nused);
-static int iFreeCB(register struct CallBack *cb, register int *nused);
-static struct FileEntry *iGetFE(register int *nused);
-static int iFreeFE(register struct FileEntry *fe, register int *nused);
-static int TAdd(register struct CallBack *cb, register afs_uint32 * thead);
-static int TDel(register struct CallBack *cb);
-static int HAdd(register struct CallBack *cb, register struct host *host);
-static int HDel(register struct CallBack *cb);
+static struct CallBack *iGetCB(int *nused);
+static int iFreeCB(struct CallBack *cb, int *nused);
+static struct FileEntry *iGetFE(int *nused);
+static int iFreeFE(struct FileEntry *fe, int *nused);
+static int TAdd(struct CallBack *cb, afs_uint32 * thead);
+static int TDel(struct CallBack *cb);
+static int HAdd(struct CallBack *cb, struct host *host);
+static int HDel(struct CallBack *cb);
static int CDel(struct CallBack *cb, int deletefe);
-static int CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
+static int CDelPtr(struct FileEntry *fe, afs_uint32 * cbp,
int deletefe);
static afs_uint32 *FindCBPtr(struct FileEntry *fe, struct host *host);
-static int FDel(register struct FileEntry *fe);
+static int FDel(struct FileEntry *fe);
static int AddCallBack1_r(struct host *host, AFSFid * fid, afs_uint32 * thead,
int type, int locked);
static void MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
/* Other protos - move out sometime */
-void PrintCB(register struct CallBack *cb, afs_uint32 now);
+void PrintCB(struct CallBack *cb, afs_uint32 now);
static afs_uint32 HashTable[FEHASH_SIZE]; /* File entry hash table */
static struct FileEntry *
-FindFE(register AFSFid * fid)
+FindFE(AFSFid * fid)
{
int hash;
- register int fei;
- register struct FileEntry *fe;
+ int fei;
+ struct FileEntry *fe;
hash = FEHash(fid->Volume, fid->Unique);
for (fei = HashTable[hash]; fei; fei = fe->fnext) {
#ifndef INTERPRET_DUMP
static struct CallBack *
-iGetCB(register int *nused)
+iGetCB(int *nused)
{
- register struct CallBack *ret;
+ struct CallBack *ret;
if ((ret = CBfree)) {
CBfree = (struct CallBack *)(((struct object *)ret)->next);
}
static int
-iFreeCB(register struct CallBack *cb, register int *nused)
+iFreeCB(struct CallBack *cb, int *nused)
{
((struct object *)cb)->next = (struct object *)CBfree;
CBfree = cb;
}
static struct FileEntry *
-iGetFE(register int *nused)
+iGetFE(int *nused)
{
- register struct FileEntry *ret;
+ struct FileEntry *ret;
if ((ret = FEfree)) {
FEfree = (struct FileEntry *)(((struct object *)ret)->next);
}
static int
-iFreeFE(register struct FileEntry *fe, register int *nused)
+iFreeFE(struct FileEntry *fe, int *nused)
{
((struct object *)fe)->next = (struct object *)FEfree;
FEfree = fe;
/* Add cb to end of specified timeout list */
static int
-TAdd(register struct CallBack *cb, register afs_uint32 * thead)
+TAdd(struct CallBack *cb, afs_uint32 * thead)
{
if (!*thead) {
(*thead) = cb->tnext = cb->tprev = cbtoi(cb);
} else {
- register struct CallBack *thp = itocb(*thead);
+ struct CallBack *thp = itocb(*thead);
cb->tprev = thp->tprev;
cb->tnext = *thead;
/* Delete call back entry from timeout list */
static int
-TDel(register struct CallBack *cb)
+TDel(struct CallBack *cb)
{
- register afs_uint32 *thead = itot(cb->thead);
+ afs_uint32 *thead = itot(cb->thead);
if (*thead == cbtoi(cb))
*thead = (*thead == cb->tnext ? 0 : cb->tnext);
/* Add cb to end of specified host list */
static int
-HAdd(register struct CallBack *cb, register struct host *host)
+HAdd(struct CallBack *cb, struct host *host)
{
cb->hhead = h_htoi(host);
if (!host->cblist) {
host->cblist = cb->hnext = cb->hprev = cbtoi(cb);
} else {
- register struct CallBack *fcb = itocb(host->cblist);
+ struct CallBack *fcb = itocb(host->cblist);
cb->hprev = fcb->hprev;
cb->hnext = cbtoi(fcb);
/* Delete call back entry from host list */
static int
-HDel(register struct CallBack *cb)
+HDel(struct CallBack *cb)
{
- register afs_uint32 *hhead = &h_itoh(cb->hhead)->cblist;
+ afs_uint32 *hhead = &h_itoh(cb->hhead)->cblist;
if (*hhead == cbtoi(cb))
*hhead = (*hhead == cb->hnext ? 0 : cb->hnext);
{
int cbi = cbtoi(cb);
struct FileEntry *fe = itofe(cb->fhead);
- register afs_uint32 *cbp;
- register int safety;
+ afs_uint32 *cbp;
+ int safety;
for (safety = 0, cbp = &fe->firstcb; *cbp && *cbp != cbi;
cbp = &itocb(*cbp)->cnext, safety++) {
static int Ccdelpt = 0, CcdelB = 0;
static int
-CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
+CDelPtr(struct FileEntry *fe, afs_uint32 * cbp,
int deletefe)
{
- register struct CallBack *cb;
+ struct CallBack *cb;
if (!*cbp)
return 0;
static afs_uint32 *
FindCBPtr(struct FileEntry *fe, struct host *host)
{
- register afs_uint32 hostindex = h_htoi(host);
- register struct CallBack *cb;
- register afs_uint32 *cbp;
- register int safety;
+ afs_uint32 hostindex = h_htoi(host);
+ struct CallBack *cb;
+ afs_uint32 *cbp;
+ int safety;
for (safety = 0, cbp = &fe->firstcb; *cbp; cbp = &cb->cnext, safety++) {
if (safety > cbstuff.nblks) {
/* Delete file entry from hash table */
static int
-FDel(register struct FileEntry *fe)
+FDel(struct FileEntry *fe)
{
- register int fei = fetoi(fe);
- register afs_uint32 *p = &HashTable[FEHash(fe->volid, fe->unique)];
+ int fei = fetoi(fe);
+ afs_uint32 *p = &HashTable[FEHash(fe->volid, fe->unique)];
while (*p && *p != fei)
p = &itofe(*p)->fnext;
XCallBackBulk_r(struct host * ahost, struct AFSFid * fids, afs_int32 nfids)
{
struct AFSCallBack tcbs[AFSCBMAX];
- register int i;
+ int i;
struct AFSCBFids tf;
struct AFSCBs tc;
int code;
host->Console &= ~2;
if (!fe) {
- register afs_uint32 hash;
+ afs_uint32 hash;
fe = newfe;
newfe = NULL;
int
DeleteCallBack(struct host *host, AFSFid * fid)
{
- register struct FileEntry *fe;
- register afs_uint32 *pcb;
+ struct FileEntry *fe;
+ afs_uint32 *pcb;
char hoststr[16];
H_LOCK;
int
DeleteFileCallBacks(AFSFid * fid)
{
- register struct FileEntry *fe;
- register struct CallBack *cb;
- register afs_uint32 cbi;
- register int n;
+ struct FileEntry *fe;
+ struct CallBack *cb;
+ afs_uint32 cbi;
+ int n;
H_LOCK;
cbstuff.DeleteFiles++;
int
DeleteAllCallBacks_r(struct host *host, int deletefe)
{
- register struct CallBack *cb;
- register int cbi, first;
+ struct CallBack *cb;
+ int cbi, first;
cbstuff.DeleteAllCallBacks++;
cbi = first = host->cblist;
cb = itocb(cbi);
cbi = cb->hnext;
if (cb->status == CB_DELAYED) {
- register struct FileEntry *fe = itofe(cb->fhead);
+ struct FileEntry *fe = itofe(cb->fhead);
thead[nfids] = cb->thead;
fids[nfids].Volume = fe->volid;
fids[nfids].Vnode = fe->vnode;
for (hash = 0; hash < FEHASH_SIZE; hash++) {
for (feip = &HashTable[hash]; (fe = itofe(*feip)) != NULL; ) {
if (fe->volid == volume) {
- register struct CallBack *cbnext;
+ struct CallBack *cbnext;
for (cb = itocb(fe->firstcb); cb; cb = cbnext) {
host = h_itoh(cb->hhead);
host->hostFlags |= HFE_LATER;
/* loop over FEs from myfe and free/break */
tthead = 0;
for (fe = myfe; fe;) {
- register struct CallBack *cbnext;
+ struct CallBack *cbnext;
for (cb = itocb(fe->firstcb); cb; cb = cbnext) {
cbnext = itocb(cb->cnext);
host = h_itoh(cb->hhead);
CleanupTimedOutCallBacks_r(void)
{
afs_uint32 now = CBtime(FT_ApproxTime());
- register afs_uint32 *thead;
- register struct CallBack *cb;
- register int ntimedout = 0;
+ afs_uint32 *thead;
+ struct CallBack *cb;
+ int ntimedout = 0;
char hoststr[16];
while (tfirst <= now) {
- register int cbi;
+ int cbi;
cbi = *(thead = THead(tfirst));
if (cbi) {
do {
* theory not give these to us anyway, but be paranoid.
*/
static int
-lih0_r(register struct host *host, register int flags, void *rock)
+lih0_r(struct host *host, int flags, void *rock)
{
struct lih_params *params = (struct lih_params *)rock;
/* same as lih0_r, except we do not prevent held hosts from being selected. */
static int
-lih1_r(register struct host *host, register int flags, void *rock)
+lih1_r(struct host *host, int flags, void *rock)
{
struct lih_params *params = (struct lih_params *)rock;
cb_stateSaveFEs(struct fs_dump_state * state)
{
int ret = 0;
- register int fei, hash;
- register struct FileEntry *fe;
+ int fei, hash;
+ struct FileEntry *fe;
AssignInt64(state->eof_offset, &state->cb_hdr->fe_offset);
struct iovec * iov, int niovecs)
{
int ret = 0, idx;
- register struct CallBack * cb;
+ struct CallBack * cb;
struct CBDiskEntry * cbdsk;
afs_uint32 fei;
{
int err = 0, cbi = 0, stats = 0, noptions = 0, all = 0, vol = 0, raw = 0;
static AFSFid fid;
- register struct FileEntry *fe;
- register struct CallBack *cb;
+ struct FileEntry *fe;
+ struct CallBack *cb;
time_t now;
int timebits = 32;
}
void
-PrintCB(register struct CallBack *cb, afs_uint32 now)
+PrintCB(struct CallBack *cb, afs_uint32 now)
{
struct FileEntry *fe = itofe(cb->fhead);
time_t expires = TIndexToTime(cb->thead);