On Mon, Jun 14, 2004 at 08:22:41AM -0400, Jeff Trawick wrote:
Joe Orton wrote:
So, I'm proposing that _POSIXSEM or _PROC_PTHREAD should never be made the default locking mechanism. Nothing to stop those who understand the trade-off making an informed choice, of course.
generally +1, though I'm concerned that Solaris may not have a good default due to the sysdef+reboot requirements which are often required with the alternative mechanisms
Ah, good stuff, I forgot about that. That undo structure limit is suprisingly low by default as well IIRC, so maybe the Right Thing is to restore the fcntl default for Solaris as per 1.3? My preference to commit below - thanks Jeff.
Index: configure.in =================================================================== RCS file: /home/cvs/apr/configure.in,v retrieving revision 1.588 diff -u -r1.588 configure.in --- configure.in 14 Jun 2004 08:53:31 -0000 1.588 +++ configure.in 14 Jun 2004 14:19:38 -0000 @@ -1597,8 +1597,10 @@ # See which lock mechanism we'll select by default on this system. # The last APR_DECIDE to execute sets the default. # At this stage, we match the ordering in Apache 1.3 -# which is (highest to lowest): pthread -> posixsem -> sysvsem -> fcntl -> flock -# +# which is (highest to lowest): sysvsem -> fcntl -> flock. +# POSIX semaphores and cross-process pthread mutexes are not +# used by default since they have less desirable behaviour when +# e.g. a process holding the mutex segfaults.
+1
(though I don't see why we should rely on such a decision tree for platforms with which we have a lot of experience, such as Linux)
Index: build/apr_hints.m4 =================================================================== RCS file: /home/cvs/apr/build/apr_hints.m4,v retrieving revision 1.62 diff -u -r1.62 apr_hints.m4 --- build/apr_hints.m4 11 Jun 2004 15:00:21 -0000 1.62 +++ build/apr_hints.m4 14 Jun 2004 14:19:38 -0000 @@ -198,6 +198,7 @@ *-solaris2*) PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'` APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT]) + APR_SETIFNULL(apr_lock_method, [USE_FCNTL_SERIALIZE])
+1