]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-build-do-not-mix-pthread-and-lwp-20081008
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 8 Oct 2008 22:15:10 +0000 (22:15 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 8 Oct 2008 22:15:10 +0000 (22:15 +0000)
LICENSE MIT

The rx library is built in lwp and pthread forms.  The methods used to
export data symbols are incompatible between the two.  The ubik library
is built with rx headers but only in the lwp form.  As a result it is
not possible to link the ubik libs without also including the lwp rx
lib.  We have pthreaded servers that require linking to the pthreaded
rx and ubik.  To fix the problem all of the macros that assigned values
to variables and were used by ubik have been converted to functions
(but only for Windows.)

(cherry picked from commit 32977eadf12aaec6608ce3457a976a0810da8590)

src/libafsrpc/afsrpc.def
src/rx/rx_globals.c
src/rx/rx_globals.h
src/tbutc/NTMakefile

index 568fd58bbc6a5131e90a11c6a96c848968423190..2cf4b9f90f2cb2833efd207a881503c3d7cbaa06 100644 (file)
@@ -233,6 +233,9 @@ EXPORTS
         clock_now                               @238
         clock_UpdateTime                        @239
         clock_haveCurrentTime                   @240
+        rx_SetRxDeadTime                        @241
+        rx_GetMinUdpBufSize                     @242
+        rx_SetUdpBufSize                        @243        
 
 ; for performance testing
         rx_TSFPQGlobSize                        @2001 DATA
index e198603e881af2e690d04902aaf3f16d95c8be9f..8f08ab109e7a4f345d8d43a0f70f8806a546745d 100644 (file)
@@ -47,3 +47,23 @@ RCSID
 #endif /* KERNEL */
 
 #include "rx_globals.h"
+
+#ifdef AFS_NT40_ENV
+
+void rx_SetRxDeadTime(int seconds)
+{
+    rx_connDeadTime = seconds;
+}
+
+int rx_GetMinUdpBufSize(void)
+{
+    return 64*1024;
+}
+
+void rx_SetUdpBufSize(int x)
+{
+    if (x > rx_GetMinUdpBufSize())
+        rx_UdpBufSize = x;
+}
+
+#endif /* AFS_NT40_ENV */
index 322af632d49abe3d5ae535bd1acbae3899540053..9a90688d338e377f2de4ef225ba6c505e30bcd75 100644 (file)
@@ -81,8 +81,13 @@ EXT int rx_stackSize GLOBALSINIT(RX_DEFAULT_STACK_SIZE);
 
 /* Time until an unresponsive connection is declared dead */
 EXT int rx_connDeadTime GLOBALSINIT(12);
+
 /* Set rx default connection dead time; set on both services and connections at creation time */
+#ifdef AFS_NT40_ENV
+void rx_SetRxDeadTime(int seconds);
+#else
 #define rx_SetRxDeadTime(seconds)   (rx_connDeadTime = (seconds))
+#endif
 
 /* Time until we toss an idle connection */
 EXT int rx_idleConnectionTime GLOBALSINIT(700);
@@ -94,9 +99,13 @@ EXT int rx_tranquil GLOBALSINIT(0);
 
 /* UDP rcv buffer size */
 EXT int rx_UdpBufSize GLOBALSINIT(64 * 1024);
+#ifdef AFS_NT40_ENV
+int   rx_GetMinUdpBufSize(void);
+void  rx_SetUdpBufSize(int x);
+#else
 #define rx_GetMinUdpBufSize()   (64*1024)
 #define rx_SetUdpBufSize(x)     (((x)>rx_GetMinUdpBufSize()) ? (rx_UdpBufSize = (x)):0)
-
+#endif
 /*
  * Variables to control RX overload management. When the number of calls
  * waiting for a thread exceed the threshold, new calls are aborted
index a055bb2393021d6744866f6dac81a6919173fffd..815530afe546b1752f9ad71d3a26c30a63dbb85b 100644 (file)
@@ -76,11 +76,10 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
              $(BUTMLIBS) \
             $(DESTDIR)\lib\afs\afsvldb.lib \
             $(DESTDIR)\lib\afs\afskauth.lib \
-            $(DESTDIR)\lib\afsubik.lib \
             $(DESTDIR)\lib\afs\afsauth.lib \
             $(DESTDIR)\lib\afsrpc.lib \
              $(DESTDIR)\lib\afsrxkad.lib \
-             $(DESTDIR)\lib\afslwp.lib \
+            $(DESTDIR)\lib\afsubik.lib \
              $(DESTDIR)\lib\afs\afsutil.lib \
              $(DESTDIR)\lib\afs\afsusd.lib \
             $(DESTDIR)\lib\afs\afspioctl.lib \