diff options
Diffstat (limited to 'src/backend/storage/lmgr/lwlock.c')
-rw-r--r-- | src/backend/storage/lmgr/lwlock.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index b1e388dc7c9..e765754d805 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -91,9 +91,6 @@ #endif -/* We use the ShmemLock spinlock to protect LWLockCounter */ -extern slock_t *ShmemLock; - #define LW_FLAG_HAS_WAITERS ((uint32) 1 << 30) #define LW_FLAG_RELEASE_OK ((uint32) 1 << 29) #define LW_FLAG_LOCKED ((uint32) 1 << 28) @@ -609,6 +606,7 @@ LWLockNewTrancheId(void) int *LWLockCounter; LWLockCounter = (int *) ((char *) MainLWLockArray - sizeof(int)); + /* We use the ShmemLock spinlock to protect LWLockCounter */ SpinLockAcquire(ShmemLock); result = (*LWLockCounter)++; SpinLockRelease(ShmemLock); |