pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove circular #include's between wait_event.h and wait_event_t
Date: Mon, 28 Apr 2025 00:10:52 +0000
Message-ID: <E1u9C5D-0026Wu-2x@gemulon.postgresql.org> (raw)

Remove circular #include's between wait_event.h and wait_event_types.h

wait_event_types.h is generated by the code, and included wait_event.h.
wait_event.h did the opposite move, including wait_event_types.h,
causing a circular dependency between both.

wait_event_types.h only needs to now about the wait event classes, so
this information is moved into its own file, and wait_event_types.h uses
this new header so as it does not depend anymore on wait_event.h.

Note that such errors can be found with clang-tidy, with commands like
this one:
clang-tidy source_file.c --checks=misc-header-include-cycle -- \
  -I/install/path/include/ -I/install/path/include/server/

Issue introduced by fa88928470b5.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/350192.1745768770@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b225c5e76ed1053e505e392423b0dab065a3b813

Modified Files
--------------
.../utils/activity/generate-wait_event_types.pl    |  2 +-
src/include/utils/wait_classes.h                   | 29 ++++++++++++++++++++++
src/include/utils/wait_event.h                     | 16 ------------
3 files changed, 30 insertions(+), 17 deletions(-)



view thread (2+ messages)

Message-ID: <E1u9C5D-0026Wu-2x@gemulon.postgresql.org>
Permalink:  ../E1u9C5D-0026Wu-2x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u9C5D-0026Wu-2x@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove circular #include's between wait_event.h and wait_event_t
  In-Reply-To: <E1u9C5D-0026Wu-2x@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox