reindent-20030715
[openafs.git] / src / rx / rx_globals.h
index 870e36c..a492d11 100644 (file)
@@ -28,7 +28,7 @@
 EXT osi_socket rx_socket;
 
 /* The array of installed services.  Null terminated. */
-EXT struct rx_service *rx_services[RX_MAX_SERVICES+1];
+EXT struct rx_service *rx_services[RX_MAX_SERVICES + 1];
 #ifdef RX_ENABLE_LOCKS
 /* Protects nRequestsRunning as well as pool allocation variables. */
 EXT afs_kmutex_t rx_serverPool_lock;
@@ -68,20 +68,20 @@ EXT int rx_extraPackets INIT(32);
 EXT int rx_stackSize INIT(RX_DEFAULT_STACK_SIZE);
 
 /* Time until an unresponsive connection is declared dead */
-EXT int        rx_connDeadTime INIT(12);
+EXT int rx_connDeadTime INIT(12);
 /* Set rx default connection dead time; set on both services and connections at creation time */
 #define rx_SetRxDeadTime(seconds)   (rx_connDeadTime = (seconds))
 
 /* Time until we toss an idle connection */
 EXT int rx_idleConnectionTime INIT(700);
 /* Time until we toss a peer structure, after all connections using are gone */
-EXT int        rx_idlePeerTime INIT(60);
+EXT int rx_idlePeerTime INIT(60);
 
 /* The file server is temporarily salvaging */
-EXT int        rx_tranquil     INIT(0);
+EXT int rx_tranquil INIT(0);
 
 /* UDP rcv buffer size */
-EXT int rx_UdpBufSize   INIT(64*1024);
+EXT int rx_UdpBufSize INIT(64 * 1024);
 #define rx_GetMinUdpBufSize()   (64*1024)
 #define rx_SetUdpBufSize(x)     (((x)>rx_GetMinUdpBufSize()) ? (rx_UdpBufSize = (x)):0)
 
@@ -90,44 +90,44 @@ EXT int rx_UdpBufSize   INIT(64*1024);
  * waiting for a thread exceed the threshold, new calls are aborted
  * with the busy error. 
  */
-EXT int rx_BusyThreshold INIT(-1);      /* default is disabled */
+EXT int rx_BusyThreshold INIT(-1);     /* default is disabled */
 EXT int rx_BusyError INIT(-1);
 
 /* These definitions should be in one place */
 #ifdef AFS_SUN5_ENV
 #define        RX_CBUF_TIME    180     /* Check for packet deficit */
-#define        RX_REAP_TIME    90          /* Check for tossable connections every 90 seconds */
+#define        RX_REAP_TIME    90      /* Check for tossable connections every 90 seconds */
 #else
 #define        RX_CBUF_TIME    120     /* Check for packet deficit */
-#define        RX_REAP_TIME    60          /* Check for tossable connections every 60 seconds */
+#define        RX_REAP_TIME    60      /* Check for tossable connections every 60 seconds */
 #endif
 
-#define RX_FAST_ACK_RATE 1      /* as of 3.4, ask for an ack every 
-                                  other packet. */
-
-EXT int rx_minWindow INIT(1); 
-EXT int rx_initReceiveWindow INIT(16); /* how much to accept */
-EXT int rx_maxReceiveWindow INIT(32);  /* how much to accept */
-EXT int rx_initSendWindow INIT(8); 
-EXT int rx_maxSendWindow INIT(32); 
-EXT int rx_nackThreshold INIT(3);      /* Number NACKS to trigger congestion recovery */
-EXT int rx_nDgramThreshold INIT(4);    /* Number of packets before increasing
-                                         packets per datagram */
+#define RX_FAST_ACK_RATE 1     /* as of 3.4, ask for an ack every 
+                                * other packet. */
+
+EXT int rx_minWindow INIT(1);
+EXT int rx_initReceiveWindow INIT(16); /* how much to accept */
+EXT int rx_maxReceiveWindow INIT(32);  /* how much to accept */
+EXT int rx_initSendWindow INIT(8);
+EXT int rx_maxSendWindow INIT(32);
+EXT int rx_nackThreshold INIT(3);      /* Number NACKS to trigger congestion recovery */
+EXT int rx_nDgramThreshold INIT(4);    /* Number of packets before increasing
+                                        * packets per datagram */
 #define RX_MAX_FRAGS 4
-EXT int rxi_nSendFrags INIT(RX_MAX_FRAGS);  /* max fragments in a datagram */
+EXT int rxi_nSendFrags INIT(RX_MAX_FRAGS);     /* max fragments in a datagram */
 EXT int rxi_nRecvFrags INIT(RX_MAX_FRAGS);
 EXT int rxi_OrphanFragSize INIT(512);
 
-#define RX_MAX_DGRAM_PACKETS 6 /* max packets per jumbogram */
+#define RX_MAX_DGRAM_PACKETS 6 /* max packets per jumbogram */
 
 EXT int rxi_nDgramPackets INIT(RX_MAX_DGRAM_PACKETS);
 /* allow n packets between soft acks - must be power of 2 -1, else change
  * macro below */
-EXT int rxi_SoftAckRate INIT(RX_FAST_ACK_RATE);  
+EXT int rxi_SoftAckRate INIT(RX_FAST_ACK_RATE);
 /* consume n packets before sending hard ack, should be larger than above,
    but not absolutely necessary.  If it's smaller, than fast receivers will
    send a soft ack, immediately followed by a hard ack. */
-EXT int rxi_HardAckRate INIT(RX_FAST_ACK_RATE+1);
+EXT int rxi_HardAckRate INIT(RX_FAST_ACK_RATE + 1);
 
 /* EXT int rx_maxWindow INIT(15);   Temporary HACK:  transmit/receive window */
 
@@ -137,7 +137,7 @@ EXT int rxi_HardAckRate INIT(RX_FAST_ACK_RATE+1);
  * It might be kind of tricky, so it might be better to shrink the
  * window size by reducing the packet size below the "natural" MTU. */
 
-#define        ACKHACK(p,r) { if (((p)->header.seq & (rxi_SoftAckRate))==0) (p)->header.flags |= RX_REQUEST_ACK; } 
+#define        ACKHACK(p,r) { if (((p)->header.seq & (rxi_SoftAckRate))==0) (p)->header.flags |= RX_REQUEST_ACK; }
 
 EXT int rx_nPackets INIT(100); /* obsolete; use rx_extraPackets now */
 
@@ -157,7 +157,8 @@ EXT int rx_packetReclaims INIT(0);
  * This is provided for backward compatibility with peers which may be unable
  * to swallow anything larger. THIS MUST NEVER DECREASE WHILE AN APPLICATION
  * IS RUNNING! */
-EXT afs_uint32 rx_maxReceiveSize INIT(OLD_MAX_PACKET_SIZE*RX_MAX_FRAGS + UDP_HDR_SIZE*(RX_MAX_FRAGS-1));
+EXT afs_uint32 rx_maxReceiveSize INIT(OLD_MAX_PACKET_SIZE * RX_MAX_FRAGS +
+                                     UDP_HDR_SIZE * (RX_MAX_FRAGS - 1));
 
 /* this is the maximum packet size that the user wants us to receive */
 /* this is set by rxTune if required */
@@ -173,7 +174,7 @@ EXT afs_uint32 rx_MyMaxSendSize INIT(8588);
 EXT afs_uint32 rx_maxJumboRecvSize INIT(RX_MAX_PACKET_SIZE);
 
 /* need this to permit progs to run on AIX systems */
-EXT int (*rxi_syscallp) (afs_uint32 a3, afs_uint32 a4, void *a5) INIT(0); 
+EXT int (*rxi_syscallp) (afs_uint32 a3, afs_uint32 a4, void *a5)INIT(0);
 
 /* List of free queue entries */
 EXT struct rx_serverQueueEntry *rx_FreeSQEList INIT(0);
@@ -194,7 +195,7 @@ EXT u_short rx_port;
 #if !defined(KERNEL) && !defined(AFS_PTHREAD_ENV)
 /* 32-bit select Mask for rx_Listener. */
 EXT fd_set rx_selectMask;
-EXT int rx_maxSocketNumber; /* Maximum socket number in the select mask. */
+EXT int rx_maxSocketNumber;    /* Maximum socket number in the select mask. */
 /* Minumum socket number in the select mask. */
 EXT int rx_minSocketNumber INIT(0x7fffffff);
 #endif
@@ -209,10 +210,10 @@ EXT int rx_minSocketNumber INIT(0x7fffffff);
    Make it a little bigger, just for fun */
 #define        RX_MAX_QUOTA    15      /* part of min packet computation */
 EXT int rx_packetQuota[RX_N_PACKET_CLASSES] INIT(RX_PACKET_QUOTAS);
-EXT int meltdown_1pkt INIT(1); /* prefer to schedule single-packet calls */
-EXT int rxi_doreclaim INIT(1);    /* if discard one packet, discard all */
-EXT int rxi_md2cnt INIT(0);    /* counter of skipped calls */
-EXT int rxi_2dchoice INIT(1);    /* keep track of another call to schedule */
+EXT int meltdown_1pkt INIT(1); /* prefer to schedule single-packet calls */
+EXT int rxi_doreclaim INIT(1); /* if discard one packet, discard all */
+EXT int rxi_md2cnt INIT(0);    /* counter of skipped calls */
+EXT int rxi_2dchoice INIT(1);  /* keep track of another call to schedule */
 
 /* quota system: each attached server process must be able to make
     progress to avoid system deadlock, so we ensure that we can always
@@ -229,18 +230,18 @@ EXT int rxi_2dchoice INIT(1);    /* keep track of another call to schedule */
     quota to send any packets) */
 /* # to reserve so that thread with input can still make calls (send packets)
    without blocking */
-EXT int rxi_dataQuota INIT(RX_MAX_QUOTA); /* packets to reserve for active threads */
+EXT int rxi_dataQuota INIT(RX_MAX_QUOTA);      /* packets to reserve for active threads */
 
 EXT afs_int32 rxi_availProcs INIT(0);  /* number of threads in the pool */
-EXT afs_int32 rxi_totalMin INIT(0);            /* Sum(minProcs) forall services */
+EXT afs_int32 rxi_totalMin INIT(0);    /* Sum(minProcs) forall services */
 EXT afs_int32 rxi_minDeficit INIT(0);  /* number of procs needed to handle all minProcs */
 
-EXT int rx_nextCid;        /* Next connection call id */
-EXT int rx_epoch;          /* Initialization time of rx */
+EXT int rx_nextCid;            /* Next connection call id */
+EXT int rx_epoch;              /* Initialization time of rx */
 #ifdef RX_ENABLE_LOCKS
 EXT afs_kcondvar_t rx_waitingForPackets_cv;
 #endif
-EXT char rx_waitingForPackets; /* Processes set and wait on this variable when waiting for packet buffers */
+EXT char rx_waitingForPackets; /* Processes set and wait on this variable when waiting for packet buffers */
 
 EXT struct rx_stats rx_stats;
 
@@ -273,14 +274,14 @@ EXT afs_kmutex_t rx_connHashTable_lock;
 
 #ifdef RXDEBUG
 /* Some debugging stuff */
-EXT FILE *rx_debugFile;        /* Set by the user to a stdio file for debugging output */
+EXT FILE *rx_debugFile;                /* Set by the user to a stdio file for debugging output */
 EXT FILE *rxevent_debugFile;   /* Set to an stdio descriptor for event logging to that file */
 
 #define rx_Log rx_debugFile
 #define dpf(args) if (rx_debugFile) rxi_DebugPrint args; else
 #define rx_Log_event rxevent_debugFile
 
-EXT char *rx_packetTypes[RX_N_PACKET_TYPES] INIT(RX_PACKET_TYPES); /* Strings defined in rx.h */
+EXT char *rx_packetTypes[RX_N_PACKET_TYPES] INIT(RX_PACKET_TYPES);     /* Strings defined in rx.h */
 
 #ifndef KERNEL
 /*
@@ -297,7 +298,7 @@ EXT afs_kmutex_t rxi_keyCreate_lock;
 #endif /* !KERNEL */
 
 #else
-#define dpf(args) 
+#define dpf(args)
 #endif /* RXDEBUG */
 
 /*
@@ -326,7 +327,7 @@ EXT int rxi_pthread_hinum INIT(0);
 #endif
 
 #if defined(RX_ENABLE_LOCKS)
-EXT afs_kmutex_t rx_stats_mutex; /* used to activate stats gathering */
+EXT afs_kmutex_t rx_stats_mutex;       /* used to activate stats gathering */
 #endif
 
 EXT int rx_enable_stats INIT(0);