1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

Harmonize parameter names in storage and AM code.

Make sure that function declarations use names that exactly match the
corresponding names from function definitions in storage, catalog,
access method, executor, and logical replication code, as well as in
miscellaneous utility/library code.

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.  Later commits will do the
same for other parts of the codebase.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
This commit is contained in:
Peter Geoghegan
2022-09-19 19:18:36 -07:00
parent c47885bd8b
commit bfcf1b3480
80 changed files with 228 additions and 218 deletions

View File

@@ -1913,13 +1913,13 @@ LWLockReleaseAll(void)
* This is meant as debug support only.
*/
bool
LWLockHeldByMe(LWLock *l)
LWLockHeldByMe(LWLock *lock)
{
int i;
for (i = 0; i < num_held_lwlocks; i++)
{
if (held_lwlocks[i].lock == l)
if (held_lwlocks[i].lock == lock)
return true;
}
return false;
@@ -1931,14 +1931,14 @@ LWLockHeldByMe(LWLock *l)
* This is meant as debug support only.
*/
bool
LWLockAnyHeldByMe(LWLock *l, int nlocks, size_t stride)
LWLockAnyHeldByMe(LWLock *lock, int nlocks, size_t stride)
{
char *held_lock_addr;
char *begin;
char *end;
int i;
begin = (char *) l;
begin = (char *) lock;
end = begin + nlocks * stride;
for (i = 0; i < num_held_lwlocks; i++)
{
@@ -1957,13 +1957,13 @@ LWLockAnyHeldByMe(LWLock *l, int nlocks, size_t stride)
* This is meant as debug support only.
*/
bool
LWLockHeldByMeInMode(LWLock *l, LWLockMode mode)
LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode)
{
int i;
for (i = 0; i < num_held_lwlocks; i++)
{
if (held_lwlocks[i].lock == l && held_lwlocks[i].mode == mode)
if (held_lwlocks[i].lock == lock && held_lwlocks[i].mode == mode)
return true;
}
return false;

View File

@@ -446,7 +446,7 @@ static void SerialSetActiveSerXmin(TransactionId xid);
static uint32 predicatelock_hash(const void *key, Size keysize);
static void SummarizeOldestCommittedSxact(void);
static Snapshot GetSafeSnapshot(Snapshot snapshot);
static Snapshot GetSafeSnapshot(Snapshot origSnapshot);
static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot,
VirtualTransactionId *sourcevxid,
int sourcepid);