aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/lwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/lmgr/lwlock.c')
-rw-r--r--src/backend/storage/lmgr/lwlock.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index 0005162b077..077bec4a60f 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.40 2006/07/14 14:52:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.41 2006/07/23 03:07:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -157,10 +157,7 @@ NumLWLocks(void)
*/
/* Predefined LWLocks */
- numLocks = (int) FirstLockMgrLock;
-
- /* lock.c gets the ones starting at FirstLockMgrLock */
- numLocks += NUM_LOCK_PARTITIONS;
+ numLocks = (int) NumFixedLWLocks;
/* bufmgr.c needs two for each shared buffer */
numLocks += 2 * NBuffers;
@@ -239,11 +236,10 @@ CreateLWLocks(void)
/*
* Initialize the dynamic-allocation counter, which is stored just before
- * the first LWLock. The LWLocks used by lock.c are not dynamically
- * allocated, it just assumes it has them.
+ * the first LWLock.
*/
LWLockCounter = (int *) ((char *) LWLockArray - 2 * sizeof(int));
- LWLockCounter[0] = (int) FirstLockMgrLock + NUM_LOCK_PARTITIONS;
+ LWLockCounter[0] = (int) NumFixedLWLocks;
LWLockCounter[1] = numLocks;
}