Re: spin.c includes pg_sema.h even if unnecessary

From: Andres Freund <andres(at)anarazel(dot)de>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: spin.c includes pg_sema.h even if unnecessary
Date: 2018-02-15 18:01:57
Message-ID: 20180215180157.7q55aytrhif7vvzw@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-02-15 20:11:07 +0900, Kyotaro HORIGUCHI wrote:
> As in another mail just before, spin.c seems a bit strange
> (without acutual harm).
>
> spin.h doesn't include pg_sema.h when HAVE_SPINLOCKS is defined,
> but spin.c always includes it even in the case. The file is
> included only to use sizeof(PGSemaphore) to calcualte
> SpinlockSemaSize as 0.
>
> The codes that requires PGSempaphore is inactivated when the
> symbol is defined in all other places so it seems to me that we
> ought to refrain from using it there, too. The attched patch does

IDK, I don't quite see the point of the change here...

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-02-15 18:04:52 Re: Add void cast to StaticAssertExpr?
Previous Message Andres Freund 2018-02-15 18:00:39 Re: Let's remove DSM_INPL_NONE.