Re: Use macros for calculating LWLock offset

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: japin <japinli(at)hotmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use macros for calculating LWLock offset
Date: 2020-11-20 06:25:50
Message-ID: 20201120062550.GD8506@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 19, 2020 at 03:39:51PM +0800, japin wrote:
> In the lwlock.c, InitializeLWLocks() calculate the LWLock offset by itself
> (c319991bcad),
> however, there are macros defined in lwlock.h, I think, we can use the
> macros.

I agree that this makes this code a bit cleaner, so let's use those
macros. Others may have some comments here, so let's wait a bit
first.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-11-20 06:31:22 Re: don't allocate HashAgg hash tables when running explain only
Previous Message Tom Lane 2020-11-20 05:59:47 Re: [PATCH 1/1] Fix compilation on mac with Xcode >= 11.4.