#include "postgres.h"
#include "storage/shmem.h"
Go to the source code of this file.
Functions | |
void | SHMQueueInit (SHM_QUEUE *queue) |
bool | SHMQueueIsDetached (const SHM_QUEUE *queue) |
void | SHMQueueElemInit (SHM_QUEUE *queue) |
void | SHMQueueDelete (SHM_QUEUE *queue) |
void | SHMQueueInsertBefore (SHM_QUEUE *queue, SHM_QUEUE *elem) |
void | SHMQueueInsertAfter (SHM_QUEUE *queue, SHM_QUEUE *elem) |
Pointer | SHMQueueNext (const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset) |
Pointer | SHMQueuePrev (const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset) |
bool | SHMQueueEmpty (const SHM_QUEUE *queue) |
void SHMQueueDelete | ( | SHM_QUEUE * | queue | ) |
Definition at line 68 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CheckTargetForConflictsIn(), CleanUpLock(), ClearOldPredicateLocks(), CreatePredXact(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), LockAcquireExtended(), PostPrepare_Locks(), ProcWakeup(), ReleaseOneSerializableXact(), ReleasePredXact(), ReleaseRWConflict(), RemoveFromWaitQueue(), SetPossibleUnsafeConflict(), SetRWConflict(), SummarizeOldestCommittedSxact(), SyncRepCancelWait(), SyncRepCleanupAtProcExit(), SyncRepWakeQueue(), and TransferPredicateLocksToNewTarget().
void SHMQueueElemInit | ( | SHM_QUEUE * | queue | ) |
Definition at line 57 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by GetSerializableTransactionSnapshotInt(), InitAuxiliaryProcess(), InitProcess(), MarkAsPreparing(), and predicatelock_twophase_recover().
{ Assert(ShmemAddrIsValid(queue)); queue->prev = queue->next = NULL; }
Definition at line 180 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CheckForSerializableConflictOut(), CleanUpLock(), GetSafeSnapshot(), InitAuxiliaryProcess(), InitProcess(), lock_twophase_recover(), ProcKill(), ReleasePredicateLocks(), RemoveTargetIfNoLongerUsed(), RWConflictExists(), SetupLockInTable(), SummarizeOldestCommittedSxact(), and TransferPredicateLocksToNewTarget().
{ Assert(ShmemAddrIsValid(queue)); if (queue->prev == queue) { Assert(queue->next == queue); return TRUE; } return FALSE; }
void SHMQueueInit | ( | SHM_QUEUE * | queue | ) |
Definition at line 36 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CreatePredicateLock(), DropAllPredicateLocksFromTable(), GetSerializableTransactionSnapshotInt(), InitPredicateLocks(), InitProcGlobal(), lock_twophase_recover(), MarkAsPreparing(), predicatelock_twophase_recover(), ProcQueueInit(), ReleaseOneSerializableXact(), SetupLockInTable(), TransferPredicateLocksToNewTarget(), and WalSndShmemInit().
{ Assert(ShmemAddrIsValid(queue)); queue->prev = queue->next = queue; }
Definition at line 108 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepQueueInsert().
Definition at line 89 of file shmqueue.c.
References Assert, SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CreatePredicateLock(), CreatePredXact(), DeadLockCheck(), DropAllPredicateLocksFromTable(), InitPredicateLocks(), lock_twophase_recover(), PostPrepare_Locks(), ProcSleep(), ReleaseOneSerializableXact(), ReleasePredicateLocks(), ReleasePredXact(), ReleaseRWConflict(), SetPossibleUnsafeConflict(), SetRWConflict(), SetupLockInTable(), and TransferPredicateLocksToNewTarget().
Definition at line 47 of file shmqueue.c.
References Assert, NULL, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepCancelWait(), SyncRepCleanupAtProcExit(), and SyncRepWaitForLSN().
{ Assert(ShmemAddrIsValid(queue)); return (queue->prev == NULL); }
Definition at line 145 of file shmqueue.c.
References Assert, SHM_QUEUE::next, and ShmemAddrIsValid().
Referenced by AtPrepare_PredicateLocks(), CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), ClearOldPredicateLocks(), CreatePredXact(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), FindLockCycleRecurse(), FirstPredXact(), FlagSxactUnsafe(), GetLockConflicts(), LockReleaseAll(), NextPredXact(), OnConflict_CheckForSerializationFailure(), PostPrepare_Locks(), PreCommit_CheckForSerializationFailure(), ReleaseOneSerializableXact(), ReleasePredicateLocks(), RWConflictExists(), SetPossibleUnsafeConflict(), SetRWConflict(), SummarizeOldestCommittedSxact(), SyncRepWakeQueue(), and TransferPredicateLocksToNewTarget().
{ SHM_QUEUE *elemPtr = curElem->next; Assert(ShmemAddrIsValid(curElem)); if (elemPtr == queue) /* back to the queue head? */ return NULL; return (Pointer) (((char *) elemPtr) - linkOffset); }
Definition at line 164 of file shmqueue.c.
References Assert, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepQueueInsert().
{ SHM_QUEUE *elemPtr = curElem->prev; Assert(ShmemAddrIsValid(curElem)); if (elemPtr == queue) /* back to the queue head? */ return NULL; return (Pointer) (((char *) elemPtr) - linkOffset); }