]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-rx-ts-fpq-20050418
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 19 Apr 2005 06:04:03 +0000 (06:04 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 19 Apr 2005 06:04:03 +0000 (06:04 +0000)
FIXES 17805

Add a new function called rx_StartClientThread() which parallels the
behavior of rx_StartServer but is used for initializing client threads.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 17805

Add a new function called rx_StartClientThread() which parallels the
behavior of rx_StartServer but is used for initializing client threads.

Also, disable RX_TSFPQ_ENABLE for Windows as it slows the client down.

src/WINNT/afsd/cm_daemon.c
src/WINNT/afsd/smb.c
src/libafsrpc/afsrpc.def
src/rx/rx.c
src/rx/rx_globals.h

index 5a0106dcd794c31a7c05895ff314275cb4033ea7..81ba1459c0e191a2e127af68b38bd98a59ef2b89 100644 (file)
@@ -42,6 +42,8 @@ void cm_BkgDaemon(long parm)
 {
     cm_bkgRequest_t *rp;
 
+    rx_StartClientThread();
+
     lock_ObtainWrite(&cm_daemonLock);
     while (daemon_ShutdownFlag == 0) {
         if (!cm_bkgListEndp) {
index df404130f7788c7013aa7d178fc2b9cdc08b6275..f7f7c5e98df7ecb30cc8194548de01ab91d7e86b 100644 (file)
@@ -6956,6 +6956,8 @@ void smb_Server(VOID *parmp)
     dos_ptr dos_ncb;
 #endif /* DJGPP */
 
+    rx_StartClientThread();
+
     outncbp = GetNCB();
     outbufp = GetPacket();
     outbufp->ncbp = outncbp;
index 00bc3da9a720d9f77fd15cf42bb31e7183de2671..69feb9674d0a0c8f3e8bc1ec53a6dbc0bd57bc18 100644 (file)
@@ -212,5 +212,6 @@ EXPORTS
         RXAFS_ResidencyCmd                      @217
         StartRXAFS_FetchData64                  @218
         StartRXAFS_StoreData64                  @219
+        rx_StartClientThread                    @220
 
 
index 55c45a7799282b8cfec5aaa57b6da46296e0668a..5f129ac1237b05a0aadc68c9ae881d35637e6f11 100644 (file)
@@ -663,6 +663,22 @@ rxi_StartServerProcs(int nExistingProcs)
 }
 #endif /* KERNEL */
 
+#ifdef AFS_NT40_ENV
+/* This routine is only required on Windows */
+void
+rx_StartClientThread(void)
+{
+#ifdef AFS_PTHREAD_ENV
+    int pid;
+    pid = (int) pthread_self();
+#endif /* AFS_PTHREAD_ENV */
+#ifdef RX_ENABLE_TSFPQ
+    rx_TSFPQMaxProcs++;
+    RX_TS_FPQ_COMPUTE_LIMITS;
+#endif /* RX_ENABLE_TSFPQ */
+}
+#endif /* AFS_NT40_ENV */
+
 /* This routine must be called if any services are exported.  If the
  * donateMe flag is set, the calling process is donated to the server
  * process pool */
index fffb414d00ce647d76e6629c5942694cf93c0072..494738f6c535e8605e4e6ce536e868f3cc56c06e 100644 (file)
@@ -208,7 +208,9 @@ EXT struct rx_queue rx_freePacketQueue;
     } while(0)
 #ifdef RX_ENABLE_LOCKS
 EXT afs_kmutex_t rx_freePktQ_lock;
-#ifdef AFS_PTHREAD_ENV
+#endif /* RX_ENABLE_LOCKS */
+
+#if defined(AFS_PTHREAD_ENV) && !defined(AFS_NT40_ENV)
 #define RX_ENABLE_TSFPQ
 EXT int rx_TSFPQGlobSize INIT(3); /* number of packets to transfer between global and local queues in one op */
 EXT int rx_TSFPQLocalMax INIT(15); /* max number of packets on local FPQ before returning a glob to the global pool */
@@ -298,8 +300,7 @@ EXT void rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local
         RX_FPQ_MARK_FREE(p); \
         (rx_ts_info_p)->_FPQ.len++; \
     } while(0)
-#endif /* AFS_PTHREAD_ENV */
-#endif /* RX_ENABLE_LOCKS */
+#endif /* AFS_PTHREAD_ENV && !AFS_NT40_ENV */
 
 /* Number of free packets */
 EXT int rx_nFreePackets INIT(0);