apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject [PATCH] controlling the flavor of lock used by APR
Date Thu, 30 Nov 2000 18:01:44 GMT
Important note: the hints.m4 change is just an example...  I won't
commit a change for Linux, but will do so for OS/390 before I
commit... 

To tailor the lock method, in hints.m4 set the apr_lock_method
variable to one of the USE_xxx_SERIALIZE symbols and magic will
happen.

Any remaining concerns before I commit?

Index: hints.m4 ----- JUST AN EXAMPLE --------
===================================================================
RCS file: /home/cvspublic/apr/hints.m4,v
retrieving revision 1.25
diff -u -r1.25 hints.m4
--- hints.m4	2000/11/28 22:43:00	1.25
+++ hints.m4	2000/11/30 18:00:53
@@ -100,6 +100,7 @@
 	APR_SETIFNULL(LIBS, [-lm])
 	;;
     *-linux-*)
+        apr_lock_method="USE_SYSVSEM_SERIALIZE"
         case `uname -r` in
 	    2.2* ) APR_SETIFNULL(CFLAGS, [-DLINUX=2])
 	           APR_SETIFNULL(LIBS, [-lm])
Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.175
diff -u -r1.175 configure.in
--- configure.in	2000/11/29 19:35:52	1.175
+++ configure.in	2000/11/30 18:00:54
@@ -617,7 +617,7 @@
     AC_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
 fi
 
-AC_BEGIN_DECISION([ap_lock implementation method])
+AC_BEGIN_DECISION([apr_lock implementation method])
 AC_IFALLYES(custom:union_semun,
             AC_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
 AC_IFALLYES(header:sys/file.h define:LOCK_EX,
@@ -627,7 +627,9 @@
 AC_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
             custom:with_pthread_cross,
             AC_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
-dnl AC_DECISION_FORCE(USE_FCNTL_SERIALIZE)
+if test "x$apr_lock_method" != "x"; then
+    AC_DECISION_FORCE($apr_lock_method)
+fi
 AC_END_DECISION
 AC_DEFINE_UNQUOTED($ac_decision)
 

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message