You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/07/01 00:29:14 UTC

Re: [PATCH] Allow pthread_mutex_t to be a cross-process lock

> On Sat, 30 Jun 2001, Bill Stoddard wrote:
>
> >
> > > 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.
> >
> > PTHREAD_PROCESS_SHARED works for me on AIX 4.3.2 and later. And you will see this is the default
for
> > Apache 1.3 for AIX.
> >
> > Are you seeing actual failures or going from memory of conversations past?
>
> Memories of conversations with Manoj.  AIX may have it working, but I
> definately remember that there are platforms with PTHREAD_PROCESS_SHARED
> defined even though it doesn't work.
>
> Ryan

AIX 4.2.1 implements pthreads draft 7 and it defines PTHREAD_PROCESS_SHARED but does not implement
it. That's probably what your thinking of.

Bill


Re: [PATCH] Allow pthread_mutex_t to be a cross-process lock

Posted by rb...@covalent.net.
> > > PTHREAD_PROCESS_SHARED works for me on AIX 4.3.2 and later. And you will see this is the default
> for
> > > Apache 1.3 for AIX.
> > >
> > > Are you seeing actual failures or going from memory of conversations past?
> >
> > Memories of conversations with Manoj.  AIX may have it working, but I
> > definately remember that there are platforms with PTHREAD_PROCESS_SHARED
> > defined even though it doesn't work.
> >
> > Ryan
>
> AIX 4.2.1 implements pthreads draft 7 and it defines PTHREAD_PROCESS_SHARED but does not implement
> it. That's probably what your thinking of.

YES, thank you for doing the research!  As it happens, Justin has a patch
that should detect that correctly.  So, +1 for Justin's patch, and this
issue goes away.  :-)

Ryan

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