mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Cross-check lists of predefined LWLocks.
Both lwlocknames.txt and wait_event_names.txt contain a list of all the predefined LWLocks, i.e., those with predefined positions within MainLWLockArray. It is easy to miss one or the other, especially since the list in wait_event_names.txt omits the "Lock" suffix from all the LWLock wait events. This commit adds a cross- check of these lists to the script that generates lwlocknames.h. If the lists do not match exactly, building will fail. Suggested-by: Robert Haas Reviewed-by: Robert Haas, Michael Paquier, Bertrand Drouvot Discussion: https://postgr.es/m/20240102173120.GA1061678%40nathanxps13
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# Copyright (c) 2022-2024, PostgreSQL Global Development Group
|
||||
|
||||
lwlocknames = custom_target('lwlocknames',
|
||||
input: files('../../backend/storage/lmgr/lwlocknames.txt'),
|
||||
input: files(
|
||||
'../../backend/storage/lmgr/lwlocknames.txt',
|
||||
'../../backend/utils/activity/wait_event_names.txt'),
|
||||
output: ['lwlocknames.h', 'lwlocknames.c'],
|
||||
command: [
|
||||
perl, files('../../backend/storage/lmgr/generate-lwlocknames.pl'),
|
||||
|
||||
Reference in New Issue
Block a user