Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e6528a

Browse files
committed
* -Remove LockMethodTable.prio field, not used (Bruce)
1 parent7dfc7e9 commit5e6528a

File tree

3 files changed

+9
-39
lines changed

3 files changed

+9
-39
lines changed

‎src/backend/storage/lmgr/lmgr.c

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.53 2002/06/20 20:29:35 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.54 2002/08/01 05:18:33 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -65,40 +65,20 @@ static LOCKMASK LockConflicts[] = {
6565

6666
};
6767

68-
staticintLockPrios[]= {
69-
0,
70-
/* AccessShareLock */
71-
1,
72-
/* RowShareLock */
73-
2,
74-
/* RowExclusiveLock */
75-
3,
76-
/* ShareUpdateExclusiveLock */
77-
4,
78-
/* ShareLock */
79-
5,
80-
/* ShareRowExclusiveLock */
81-
6,
82-
/* ExclusiveLock */
83-
7,
84-
/* AccessExclusiveLock */
85-
8
86-
};
87-
8868
LOCKMETHODLockTableId= (LOCKMETHOD)NULL;
8969
LOCKMETHODLongTermTableId= (LOCKMETHOD)NULL;
9070

9171
/*
92-
* Create the lock table described by LockConflicts and LockPrios.
72+
* Create the lock table described by LockConflicts
9373
*/
9474
LOCKMETHOD
9575
InitLockTable(intmaxBackends)
9676
{
9777
intlockmethod;
9878

9979
lockmethod=LockMethodTableInit("LockTable",
100-
LockConflicts,LockPrios,
101-
MAX_LOCKMODES-1,maxBackends);
80+
LockConflicts,MAX_LOCKMODES-1,
81+
maxBackends);
10282
LockTableId=lockmethod;
10383

10484
if (!(LockTableId))

‎src/backend/storage/lmgr/lock.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.110 2002/07/19 00:17:40 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.111 2002/08/01 05:18:33 momjian Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -208,18 +208,14 @@ GetLocksMethodTable(LOCK *lock)
208208
staticvoid
209209
LockMethodInit(LOCKMETHODTABLE*lockMethodTable,
210210
LOCKMASK*conflictsP,
211-
int*prioP,
212211
intnumModes)
213212
{
214213
inti;
215214

216215
lockMethodTable->numLockModes=numModes;
217216
numModes++;
218-
for (i=0;i<numModes;i++,prioP++,conflictsP++)
219-
{
217+
for (i=0;i<numModes;i++,conflictsP++)
220218
lockMethodTable->conflictTab[i]=*conflictsP;
221-
lockMethodTable->prio[i]=*prioP;
222-
}
223219
}
224220

225221
/*
@@ -234,7 +230,6 @@ LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
234230
LOCKMETHOD
235231
LockMethodTableInit(char*tabName,
236232
LOCKMASK*conflictsP,
237-
int*prioP,
238233
intnumModes,
239234
intmaxBackends)
240235
{
@@ -335,7 +330,7 @@ LockMethodTableInit(char *tabName,
335330
elog(FATAL,"LockMethodTableInit: couldn't initialize %s",tabName);
336331

337332
/* init data structures */
338-
LockMethodInit(lockMethodTable,conflictsP,prioP,numModes);
333+
LockMethodInit(lockMethodTable,conflictsP,numModes);
339334

340335
LWLockRelease(LockMgrLock);
341336

‎src/include/storage/lock.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: lock.h,v 1.63 2002/07/19 00:17:40 momjian Exp $
10+
* $Id: lock.h,v 1.64 2002/08/01 05:18:34 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -80,10 +80,6 @@ typedef int LOCKMETHOD;
8080
*type conflicts. conflictTab[i] is a mask with the j-th bit
8181
*turned on if lock types i and j conflict.
8282
*
83-
* prio -- each lockmode has a priority, so, for example, waiting
84-
*writers can be given priority over readers (to avoid
85-
*starvation). XXX this field is not actually used at present!
86-
*
8783
* masterLock -- synchronizes access to the table
8884
*
8985
*/
@@ -94,7 +90,6 @@ typedef struct LOCKMETHODTABLE
9490
LOCKMETHODlockmethod;
9591
intnumLockModes;
9692
intconflictTab[MAX_LOCKMODES];
97-
intprio[MAX_LOCKMODES];
9893
LWLockIdmasterLock;
9994
}LOCKMETHODTABLE;
10095

@@ -215,7 +210,7 @@ typedef struct PROCLOCK
215210
externvoidInitLocks(void);
216211
externLOCKMETHODTABLE*GetLocksMethodTable(LOCK*lock);
217212
externLOCKMETHODLockMethodTableInit(char*tabName,LOCKMASK*conflictsP,
218-
int*prioP,intnumModes,intmaxBackends);
213+
intnumModes,intmaxBackends);
219214
externLOCKMETHODLockMethodTableRename(LOCKMETHODlockmethod);
220215
externboolLockAcquire(LOCKMETHODlockmethod,LOCKTAG*locktag,
221216
TransactionIdxid,LOCKMODElockmode,booldontWait);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp