Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a95ac41

Browse files
committed
More comment cleanups.
1 parent 82fc51e commit a95ac41

File tree

1 file changed

+15
-13
lines changed
  • src/backend/storage/lmgr

1 file changed

+15
-13
lines changed

src/backend/storage/lmgr/lock.c

Lines changed: 15 additions & 13 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.82 2001/02/22 23:02:33 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.83 2001/02/22 23:20:06 momjian Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -45,7 +45,7 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
4545
static void LockCountMyLocks(SHMEM_OFFSET lockOffset, PROC *proc,
4646
int *myHolding);
4747

48-
static char *lock_types[] =
48+
static char *lock_mode_names[] =
4949
{
5050
"INVALID",
5151
"AccessShareLock",
@@ -65,16 +65,18 @@ static char *DeadLockMessage = "Deadlock detected.\n\tSee the lock(l) manual pag
6565
/*------
6666
* The following configuration options are available for lock debugging:
6767
*
68-
* trace_locks -- give a bunch of output what's going on in this file
69-
* trace_userlocks -- same but for user locks
70-
* trace_lock_oidmin-- do not trace locks for tables below this oid
68+
* TRACE_LOCKS -- give a bunch of output what's going on in this file
69+
* TRACE_USERLOCKS -- same but for user locks
70+
* TRACE_LOCK_OIDMIN-- do not trace locks for tables below this oid
7171
* (use to avoid output on system tables)
72-
* trace_lock_table -- trace locks on this table (oid) unconditionally
73-
* debug_deadlocks -- currently dumps locks at untimely occasions ;)
72+
* TRACE_LOCK_TABLE -- trace locks on this table (oid) unconditionally
73+
* DEBUG_DEADLOCKS -- currently dumps locks at untimely occasions ;)
74+
*
7475
* Furthermore, but in storage/ipc/spin.c:
75-
* trace_spinlocks -- trace spinlocks (pretty useless)
76+
* TRACE_SPINLOCKS -- trace spinlocks (pretty useless)
7677
*
77-
* Define LOCK_DEBUG at compile time to get all this enabled.
78+
* Define LOCK_DEBUG at compile time to get all these enabled.
79+
* --------
7880
*/
7981

8082
int Trace_lock_oidmin = BootstrapObjectIdData;
@@ -112,7 +114,7 @@ LOCK_PRINT(const char * where, const LOCK * lock, LOCKMODE type)
112114
lock->granted[1], lock->granted[2], lock->granted[3],
113115
lock->granted[4], lock->granted[5], lock->granted[6],
114116
lock->granted[7], lock->nGranted,
115-
lock->waitProcs.size, lock_types[type]);
117+
lock->waitProcs.size, lock_mode_names[type]);
116118
}
117119

118120

@@ -494,7 +496,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
494496
#ifdef LOCK_DEBUG
495497
if (lockmethod == USER_LOCKMETHOD && Trace_userlocks)
496498
elog(DEBUG, "LockAcquire: user lock [%u] %s",
497-
locktag->objId.blkno, lock_types[lockmode]);
499+
locktag->objId.blkno, lock_mode_names[lockmode]);
498500
#endif
499501

500502
/* ???????? This must be changed when short term locks will be used */
@@ -615,7 +617,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
615617
break; /* safe: we have a lock >= req level */
616618
elog(DEBUG, "Deadlock risk: raising lock level"
617619
" from %s to %s on object %u/%u/%u",
618-
lock_types[i], lock_types[lockmode],
620+
lock_mode_names[i], lock_mode_names[lockmode],
619621
lock->tag.relId, lock->tag.dbId, lock->tag.objId.blkno);
620622
break;
621623
}
@@ -1123,7 +1125,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag,
11231125
Assert(holder->holding[lockmode] >= 0);
11241126
SpinRelease(masterLock);
11251127
elog(NOTICE, "LockRelease: you don't own a lock of type %s",
1126-
lock_types[lockmode]);
1128+
lock_mode_names[lockmode]);
11271129
return FALSE;
11281130
}
11291131
Assert(holder->nHolding > 0);

0 commit comments

Comments
 (0)