From: Alvaro Herrera Date: Tue, 17 Sep 2013 01:14:14 +0000 (-0300) Subject: Remove `proc` argument from LockCheckConflicts X-Git-Tag: REL9_4_BETA1~1145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1247ea28cbc834bd6750b569537baff4e35edf79;p=postgresql Remove `proc` argument from LockCheckConflicts This has been unused since commit 8563ccae2caf. Noted by Antonin Houska --- 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);