Re: Raising our compiler requirements for 9.6 - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Raising our compiler requirements for 9.6
Date
Msg-id 20150807032343.GA1813690@tornado.leadboat.com
Whole thread Raw
In response to Re: Raising our compiler requirements for 9.6  (Andres Freund <andres@anarazel.de>)
Responses Re: Raising our compiler requirements for 9.6  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Aug 06, 2015 at 05:34:50PM +0200, Andres Freund wrote:
> On 2015-08-06 12:29:15 -0300, Alvaro Herrera wrote:
> > Andres Freund wrote:
> > > @@ -0,0 +1,56 @@
> > > +/*-------------------------------------------------------------------------
> > > + *
> > > + * lockdefs.h
> > > + *       Frontend exposed parts of postgres' low level lock mechanism
> > > + *
> > > + * The split between lockdefs.h and lock.h is not very principled.
> > 
> > No kidding!
> 
> Do you have a good suggestion about the split? I wanted to expose the
> minimal amount necessary, and those were the ones.

lock.h includes lwlock.h only for the benefit of the three LockHashPartition*
macros.  Those macros are pieces of the lock.c implementation that cross into
proc.c, not pieces of the lock.c public API.  I suggest instead making a
lock_internals.h for those macros and for anything else private to the various
files of the lock implementation.  For example, the PROCLOCK struct and the
functions that take arguments of that type would fit in lock_internals.h.
With that, indirect frontend lock.h inclusion will work fine.

Thanks,
nm



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Autonomous Transaction is back
Next
From: Amit Kapila
Date:
Subject: Re: Reduce ProcArrayLock contention