apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: [PATCH] Allow pthread_mutex_t to be a cross-process lock
Date Sat, 30 Jun 2001 20:16:43 GMT
On Sat, 30 Jun 2001, Justin Erenkrantz wrote:

> Can someone enlighten me as to why we have --with-pthread-cross and we
> aren't telling anyone?  If we have pthread.h, PTHREAD_PROCESS_SHARED,
> and pthread_mutexattr_setpshared, it seems reasonable enough to
> define USE_PROC_PTHREAD_SERIALIZE to 1.  Or, are pthread_mutex_t not
> suitable for cross-process locks for some other reason that we have to
> have a manual override?
>
> Unless someone says otherwise, I'll commit this tonight/tomorrow.

In general, most platforms don't really support cross process pthread
mutex's.  Even those that have PTHREAD_PROCESS_SHARED tend to not work
properly.  For example, AIX has that defined, but they don't really
support pthread mutex's cross processes.

Ryan

> -- justin
>
> Index: configure.in
> ===================================================================
> RCS file: /home/cvs/apr/configure.in,v
> retrieving revision 1.321
> diff -u -r1.321 configure.in
> --- configure.in	2001/06/28 01:57:02	1.321
> +++ configure.in	2001/06/30 19:52:34
> @@ -955,7 +955,7 @@
>  APR_IFALLYES(header:fcntl.h define:F_SETLK,
>              APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
>  APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
> -            func:pthread_mutexattr_setpshared custom:with_pthread_cross,
> +            func:pthread_mutexattr_setpshared,
>              APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
>  if test "x$apr_lock_method" != "x"; then
>      APR_DECISION_FORCE($apr_lock_method)
>
>
>


_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------


Mime
View raw message