diff options
author | Nathan Bossart <nathan@postgresql.org> | 2025-08-29 12:13:37 -0500 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2025-08-29 12:13:37 -0500 |
commit | 67fcf48c3bb3cc3cf51788332701ffb694fb108b (patch) | |
tree | 588d2cf1d323ce126875f32c5f8c3830bdf86c2f /src/include/regex/regexp.h | |
parent | 66fa3b5eef6e4764a3beb097ecc9e04b6d956bc9 (diff) |
Make LWLockCounter a global variable.
Using the LWLockCounter requires first calculating its address in
shared memory like this:
LWLockCounter = (int *) ((char *) MainLWLockArray - sizeof(int));
Commit 82e861fbe1 started this trend in order to fix EXEC_BACKEND
builds, but it could also be fixed by adding it to the
BackendParameters struct. The current approach is somewhat
difficult to follow, so this commit switches to the latter. While
at it, swap around the code in LWLockShmemSize() to match the order
of assignments in CreateLWLocks() for added readability.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aLDLnan9gNCS9fHx%40nathan
Diffstat (limited to 'src/include/regex/regexp.h')
0 files changed, 0 insertions, 0 deletions