mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Rework lwlocknames.txt to become lwlocklist.h
This way, we can fold the list of lock names to occur in
BuiltinTrancheNames instead of having its own separate array. This
saves two lines of code in GetLWTrancheName and some space in
BuiltinTrancheNames, as foreseen in commit 74a7306310, as well as
removing the need for a separate lwlocknames.c file.
We still have to build lwlocknames.h using Perl code, which initially I
wanted to avoid, but it gives us the chance to cross-check
wait_event_names.txt.
Discussion: https://postgr.es/m/202401231025.gbv4nnte5fmm@alvherre.pgsql
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include "port/atomics.h"
|
||||
#include "storage/lwlocknames.h"
|
||||
#include "storage/proclist_types.h"
|
||||
|
||||
struct PGPROC;
|
||||
@@ -82,9 +83,6 @@ typedef struct NamedLWLockTranche
|
||||
extern PGDLLIMPORT NamedLWLockTranche *NamedLWLockTrancheArray;
|
||||
extern PGDLLIMPORT int NamedLWLockTrancheRequests;
|
||||
|
||||
/* Names for fixed lwlocks */
|
||||
#include "storage/lwlocknames.h"
|
||||
|
||||
/*
|
||||
* It's a bit odd to declare NUM_BUFFER_PARTITIONS and NUM_LOCK_PARTITIONS
|
||||
* here, but we need them to figure out offsets within MainLWLockArray, and
|
||||
|
||||
Reference in New Issue
Block a user