apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: [PATCH] add apr_proc_mutex for the new Lock API
Date Sat, 15 Sep 2001 00:00:13 GMT
On Friday 14 September 2001 03:51 pm, Greg Stein wrote:
> On Fri, Sep 14, 2001 at 03:23:35PM -0700, Aaron Bannert wrote:
> > One note, more of a question to the other APR developers...see my inline
> > comment:
> >
> > On Fri, Sep 14, 2001 at 03:15:47PM -0700, Aaron Bannert wrote:
> > [snip]
> >
> > > #if !APR_HAVE_UNION_SEMUN && defined(APR_HAS_SYSVSEM_SERIALIZE)
> > > /* it makes no sense, but this isn't defined on solaris */
> > > union semun {
> > >     long val;
> > >     struct semid_ds *buf;
> > >     ushort *array;
> > > };
> > > #endif
> >
> > [snip]
> >
> > Since this is now defined in include/arch/unix/proc_mutex.h AND
> > include/arch/unix/lock.h, if both are #included into a file there
> > will be redifition errors/warnings. Should we invent a symbol to
> > protect this section from double-inclusion?
>
> No. It should just be defined in one spot (say lock.h), and proc_mutex.h
> would then include lock.h.
>
> Why would we even think of duplicating the definition, and then patching
> around that?

I agree with Greg, with one exception.  It should live in proc_mutex.h, which 
lock.h includes, because lock.h is going to go away when the locking API is 
done being re-written.

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

Mime
View raw message