# include <afs/rxgen_consts.h>
#endif /* KERNEL */
+#ifdef RXDEBUG
+extern afs_uint32 LWP_ThreadId();
+#endif /* RXDEBUG */
+
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
struct rx_tq_debug {
afs_int32 rxi_start_aborted; /* rxi_start awoke after rxi_Send in error. */
{
struct rx_serverQueueEntry *np;
register int i, j;
+ register struct rx_call *call;
+ register struct rx_serverQueueEntry *sq;
LOCK_RX_INIT
if (rxinit_status == 1) {
return; /* Already shutdown. */
}
+#ifndef KERNEL
+ rx_port = 0;
+#ifndef AFS_PTHREAD_ENV
+ FD_ZERO(&rx_selectMask);
+#endif /* AFS_PTHREAD_ENV */
+ rxi_dataQuota = RX_MAX_QUOTA;
+#ifndef AFS_PTHREAD_ENV
+ rxi_StopListener();
+#endif /* AFS_PTHREAD_ENV */
+ shutdown_rxevent();
+ rx_SetEpoch(0);
+#ifndef AFS_PTHREAD_ENV
+#ifndef AFS_USE_GETTIMEOFDAY
+ clock_UnInit();
+#endif /* AFS_USE_GETTIMEOFDAY */
+#endif /* AFS_PTHREAD_ENV */
+
+ while (!queue_IsEmpty(&rx_freeCallQueue)) {
+ call = queue_First(&rx_freeCallQueue, rx_call);
+ queue_Remove(call);
+ rxi_Free(call, sizeof(struct rx_call));
+ }
+
+ while (!queue_IsEmpty(&rx_idleServerQueue)) {
+ sq = queue_First(&rx_idleServerQueue, rx_serverQueueEntry);
+ queue_Remove(sq);
+ }
+#endif /* KERNEL */
+
{
struct rx_peer **peer_ptr, **peer_end;
for (peer_ptr = &rx_peerHashTable[0],
int clock_haveCurrentTime;
int clock_nUpdates; /* The actual number of clock updates */
+static int clockInitialized = 0;
/* Initialize the clock */
void clock_Init(void) {
- static initialized = 0;
struct itimerval itimer, otimer;
- if (!initialized) {
+ if (!clockInitialized) {
itimer.it_value.tv_sec = STARTVALUE;
itimer.it_value.tv_usec = 0;
itimer.it_interval.tv_sec = 0;
fflush (stderr);
exit(1);
}
- initialized = 1;
+ clockInitialized = 1;
}
clock_UpdateTime();
}
+#ifndef KERNEL
+/* Make clock uninitialized. */
+clock_UnInit()
+{
+ clockInitialized = 0;
+}
+#endif
+
/* Compute the current time. The timer gets the current total elapsed time since startup, expressed in seconds and microseconds. This call is almost 200 usec on an APC RT */
void clock_UpdateTime()
{
int clock_haveCurrentTime;
int clock_nUpdates; /* The actual number of clock updates */
+static int clockInitialized = 0;
/* Timing tests show that we can compute times at about 4uS per call. */
LARGE_INTEGER rxi_clock0;
exit(1);
}
+ clockInitialized = 1;
(void) QueryPerformanceCounter(&rxi_clock0);
clock_UpdateTime();
}
+#ifndef KERNEL
+/* Make clock uninitialized. */
+clock_UnInit()
+{
+ clockInitialized = 0;
+}
+#endif
+
void clock_UpdateTime(void)
{
LARGE_INTEGER now, delta;