static int afs_CacheInit_Done = 0;
static int afs_Go_Done = 0;
extern struct interfaceAddr afs_cb_interface;
+#ifdef RXK_LISTENER_ENV
static int afs_RX_Running = 0;
+#endif
static int afs_InitSetup_done = 0;
afs_int32 afs_numcachefiles = -1;
afs_int32 afs_numfilesperdir = -1;
afs_FlushAllVCaches();
#endif
+ afs_termState = AFSOP_STOP_BKG;
+
+ afs_warn("BkG... ");
+ /* Wake-up afs_brsDaemons so that we don't have to wait for a bkg job! */
+ while (afs_termState == AFSOP_STOP_BKG) {
+ afs_osi_Wakeup(&afs_brsDaemons);
+ afs_osi_Sleep(&afs_termState);
+ }
+
afs_warn("CB... ");
afs_termState = AFSOP_STOP_RXCALLBACK;
afs_osi_Sleep(&afs_termState);
}
}
- afs_warn("BkG... ");
- /* Wake-up afs_brsDaemons so that we don't have to wait for a bkg job! */
- while (afs_termState == AFSOP_STOP_BKG) {
- afs_osi_Wakeup(&afs_brsDaemons);
- afs_osi_Sleep(&afs_termState);
- }
afs_warn("CTrunc... ");
/* Cancel cache truncate daemon. */
while (afs_termState == AFSOP_STOP_TRUNCDAEMON) {
afs_osi_Wakeup(&afsdb_req);
} else {
afsdb_handler_shutdown = 1;
+#if defined(AFS_SUN5_ENV) || defined(RXK_LISTENER_ENV) || defined(RXK_UPCALL_ENV)
afs_termState = AFSOP_STOP_RXEVENT;
+#else
+ afs_termState = AFSOP_STOP_COMPLETE;
+#endif
afs_osi_Wakeup(&afs_termState);
}
}
last10MinCheck = lastCheck = osi_Time();
while (1) {
if (afs_termState == AFSOP_STOP_CS) {
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
break;
}
}
/* shutdown check. */
if (afs_termState == AFSOP_STOP_CS) {
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
break;
}
if (afs_CheckServerDaemonStarted)
afs_termState = AFSOP_STOP_CS;
else
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
return;
}
if (afs_termState == AFSOP_STOP_BKG) {
if (--afs_nbrs <= 0)
- afs_termState = AFSOP_STOP_TRUNCDAEMON;
+ afs_termState = AFSOP_STOP_RXCALLBACK;
ReleaseWriteLock(&afs_xbrs);
afs_osi_Wakeup(&afs_termState);
#ifdef AFS_NEW_BKG