Re: Busted includes somewhere near worker_internal.h

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Busted includes somewhere near worker_internal.h
Date: 2020-07-17 20:24:14
Message-ID: 20200717202414.457tu2b7ygrxcsi7@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-07-17 16:09:14 -0400, Tom Lane wrote:
> headerscheck and cpluspluscheck are both unhappy about this:
>
> ./src/include/replication/worker_internal.h:49:2: error: unknown type name 'slock_t'
> slock_t relmutex;
> ^~~~~~~
>
> Now, worker_internal.h itself hasn't changed in some time.
> I conclude that somebody rearranged one of the header files
> it depends on. Anyone have an idea what the relevant change
> was? Should we just include spin.h here, or is there a
> better fix?

I'm probably to blame for that - I've removed the s_lock.h (it wasn't
spin.h for some reason) include from lwlock.h:

commit f219167910ad33dfd8f1b0bba15323d71a91c4e9
Author: Andres Freund <andres(at)anarazel(dot)de>
Date: 2020-06-18 19:40:09 -0700

Clean up includes of s_lock.h.

Users of spinlocks should use spin.h, not s_lock.h. And lwlock.h
hasn't utilized spinlocks for quite a while.

Discussion: https://postgr.es/m/20200618183041.upyrd25eosecyf3x@alap3.anarazel.de

I think including spin.h is the right fix, given that it needs to know
the size of s_lock.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2020-07-17 20:26:04 Re: SQL/JSON: functions
Previous Message Tom Lane 2020-07-17 20:09:14 Busted includes somewhere near worker_internal.h