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

Add debug check function LWLockHeldByMeInMode()

Tests whether my process holds a lock in given mode.
Add initial usage in MarkBufferDirty().

Thomas Munro
This commit is contained in:
Simon Riggs
2016-09-05 10:38:08 +01:00
parent ec03f4121c
commit 016abf1fb8
3 changed files with 23 additions and 5 deletions

View File

@@ -175,6 +175,7 @@ extern void LWLockRelease(LWLock *lock);
extern void LWLockReleaseClearVar(LWLock *lock, uint64 *valptr, uint64 val);
extern void LWLockReleaseAll(void);
extern bool LWLockHeldByMe(LWLock *lock);
extern bool LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode);
extern bool LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval);
extern void LWLockUpdateVar(LWLock *lock, uint64 *valptr, uint64 value);