From 1247ea28cbc834bd6750b569537baff4e35edf79 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 16 Sep 2013 22:14:14 -0300 Subject: [PATCH] Remove `proc` argument from LockCheckConflicts This has been unused since commit 8563ccae2caf. Noted by Antonin Houska --- src/backend/storage/lmgr/lock.c | 5 ++--- src/backend/storage/lmgr/proc.c | 6 ++---- src/include/storage/lock.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 273c722302..f4f32e946b 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -906,7 +906,7 @@ LockAcquireExtended(const LOCKTAG *locktag, status = STATUS_FOUND; else status = LockCheckConflicts(lockMethodTable, lockmode, - lock, proclock, MyProc); + lock, proclock); if (status == STATUS_OK) { @@ -1256,8 +1256,7 @@ int LockCheckConflicts(LockMethod lockMethodTable, LOCKMODE lockmode, LOCK *lock, - PROCLOCK *proclock, - PGPROC *proc) + PROCLOCK *proclock) { int numLockModes = lockMethodTable->numLockModes; LOCKMASK myLocks; diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 25bd528566..222251df65 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -997,8 +997,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) LockCheckConflicts(lockMethodTable, lockmode, lock, - proclock, - MyProc) == STATUS_OK) + proclock) == STATUS_OK) { /* Skip the wait and just grant myself the lock. */ GrantLock(lock, proclock, lockmode); @@ -1384,8 +1383,7 @@ ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock) LockCheckConflicts(lockMethodTable, lockmode, lock, - proc->waitProcLock, - proc) == STATUS_OK) + proc->waitProcLock) == STATUS_OK) { /* OK to waken */ GrantLock(lock, proc->waitProcLock, lockmode); diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 9642a19821..7bcaf7cfca 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -503,7 +503,7 @@ extern void AtPrepare_Locks(void); extern void PostPrepare_Locks(TransactionId xid); extern int LockCheckConflicts(LockMethod lockMethodTable, LOCKMODE lockmode, - LOCK *lock, PROCLOCK *proclock, PGPROC *proc); + LOCK *lock, PROCLOCK *proclock); extern void GrantLock(LOCK *lock, PROCLOCK *proclock, LOCKMODE lockmode); extern void GrantAwaitedLock(void); extern void RemoveFromWaitQueue(PGPROC *proc, uint32 hashcode); -- 2.40.0