diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-08-29 09:46:21 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-08-29 09:46:21 +0300 |
commit | 478846e7688c9ab73d2695a66822e9ae0574b551 (patch) | |
tree | 119f557cdd41e48f26ee5be37f93a95d8fe97b5e /src/backend/storage/ipc/sinvaladt.c | |
parent | fbce7dfc77eaa0d017dfee78c9d27b142d435e41 (diff) |
Rename some shared memory initialization routines
To make them follow the usual naming convention where
FoobarShmemSize() calculates the amount of shared memory needed by
Foobar subsystem, and FoobarShmemInit() performs the initialization.
I didn't rename CreateLWLocks() and InitShmmeIndex(), because they are
a little special. They need to be called before any of the other
ShmemInit() functions, because they set up the shared memory
bookkeeping itself. I also didn't rename InitProcGlobal(), because
unlike other Shmeminit functions, it's not called by individual
backends.
Reviewed-by: Andreas Karlsson
Discussion: https://www.postgresql.org/message-id/c09694ff-2453-47e5-b26c-32a16cd75ce6@iki.fi
Diffstat (limited to 'src/backend/storage/ipc/sinvaladt.c')
-rw-r--r-- | src/backend/storage/ipc/sinvaladt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index b486d8ddd1d..db59637c438 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -212,10 +212,10 @@ static void CleanupInvalidationState(int status, Datum arg); /* - * SInvalShmemSize --- return shared-memory space needed + * SharedInvalShmemSize --- return shared-memory space needed */ Size -SInvalShmemSize(void) +SharedInvalShmemSize(void) { Size size; @@ -227,18 +227,18 @@ SInvalShmemSize(void) } /* - * CreateSharedInvalidationState + * SharedInvalShmemInit * Create and initialize the SI message buffer */ void -CreateSharedInvalidationState(void) +SharedInvalShmemInit(void) { int i; bool found; /* Allocate space in shared memory */ shmInvalBuffer = (SISeg *) - ShmemInitStruct("shmInvalBuffer", SInvalShmemSize(), &found); + ShmemInitStruct("shmInvalBuffer", SharedInvalShmemSize(), &found); if (found) return; |