mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
lwlock: Remove ForEachLWLockHeldByMe
As of commitfcb9c977aa, ForEachLWLockHeldByMe(), introduced inf4ece891fc, is not used anymore, as content locks are now implemented in bufmgr.c. It doesn't seem that likely that a new user of the functionality will appear all that soon, making removal of the function seem like the most sensible path. It can easily be added back if necessary. Discussion: https://postgr.es/m/lneuyxqxamqoayd2ntau3lqjblzdckw6tjgeu4574ezwh4tzlg%40noioxkquezdw
This commit is contained in:
@@ -1955,21 +1955,6 @@ LWLockReleaseAll(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ForEachLWLockHeldByMe - run a callback for each held lock
|
||||
*
|
||||
* This is meant as debug support only.
|
||||
*/
|
||||
void
|
||||
ForEachLWLockHeldByMe(void (*callback) (LWLock *, LWLockMode, void *),
|
||||
void *context)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < num_held_lwlocks; i++)
|
||||
callback(held_lwlocks[i].lock, held_lwlocks[i].mode, context);
|
||||
}
|
||||
|
||||
/*
|
||||
* LWLockHeldByMe - test whether my process holds a lock in any mode
|
||||
*
|
||||
|
||||
@@ -129,8 +129,6 @@ extern void LWLockReleaseClearVar(LWLock *lock, pg_atomic_uint64 *valptr, uint64
|
||||
extern void LWLockReleaseAll(void);
|
||||
extern void LWLockDisown(LWLock *lock);
|
||||
extern void LWLockReleaseDisowned(LWLock *lock, LWLockMode mode);
|
||||
extern void ForEachLWLockHeldByMe(void (*callback) (LWLock *, LWLockMode, void *),
|
||||
void *context);
|
||||
extern bool LWLockHeldByMe(LWLock *lock);
|
||||
extern bool LWLockAnyHeldByMe(LWLock *lock, int nlocks, size_t stride);
|
||||
extern bool LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode);
|
||||
|
||||
Reference in New Issue
Block a user