1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

* -Remove LockMethodTable.prio field, not used (Bruce)

This commit is contained in:
Bruce Momjian
2002-08-01 05:18:34 +00:00
parent 7dfc7e9e8c
commit 5e6528adf7
3 changed files with 9 additions and 39 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.53 2002/06/20 20:29:35 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.54 2002/08/01 05:18:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -65,31 +65,11 @@ static LOCKMASK LockConflicts[] = {
};
static int LockPrios[] = {
0,
/* AccessShareLock */
1,
/* RowShareLock */
2,
/* RowExclusiveLock */
3,
/* ShareUpdateExclusiveLock */
4,
/* ShareLock */
5,
/* ShareRowExclusiveLock */
6,
/* ExclusiveLock */
7,
/* AccessExclusiveLock */
8
};
LOCKMETHOD LockTableId = (LOCKMETHOD) NULL;
LOCKMETHOD LongTermTableId = (LOCKMETHOD) NULL;
/*
* Create the lock table described by LockConflicts and LockPrios.
* Create the lock table described by LockConflicts
*/
LOCKMETHOD
InitLockTable(int maxBackends)
@@ -97,8 +77,8 @@ InitLockTable(int maxBackends)
int lockmethod;
lockmethod = LockMethodTableInit("LockTable",
LockConflicts, LockPrios,
MAX_LOCKMODES - 1, maxBackends);
LockConflicts, MAX_LOCKMODES - 1,
maxBackends);
LockTableId = lockmethod;
if (!(LockTableId))

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.110 2002/07/19 00:17:40 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.111 2002/08/01 05:18:33 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -208,18 +208,14 @@ GetLocksMethodTable(LOCK *lock)
static void
LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
LOCKMASK *conflictsP,
int *prioP,
int numModes)
{
int i;
lockMethodTable->numLockModes = numModes;
numModes++;
for (i = 0; i < numModes; i++, prioP++, conflictsP++)
{
for (i = 0; i < numModes; i++, conflictsP++)
lockMethodTable->conflictTab[i] = *conflictsP;
lockMethodTable->prio[i] = *prioP;
}
}
/*
@@ -234,7 +230,6 @@ LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
LOCKMETHOD
LockMethodTableInit(char *tabName,
LOCKMASK *conflictsP,
int *prioP,
int numModes,
int maxBackends)
{
@@ -335,7 +330,7 @@ LockMethodTableInit(char *tabName,
elog(FATAL, "LockMethodTableInit: couldn't initialize %s", tabName);
/* init data structures */
LockMethodInit(lockMethodTable, conflictsP, prioP, numModes);
LockMethodInit(lockMethodTable, conflictsP, numModes);
LWLockRelease(LockMgrLock);