MCPcopy Create free account
hub / github.com/apache/cloudberry / SHMQueueInsertBefore

Function SHMQueueInsertBefore

src/backend/storage/ipc/shmqueue.c:88–100  ·  view source on GitHub ↗

* SHMQueueInsertBefore -- put elem in queue before the given queue * element. Inserting "before" the queue head puts the elem * at the tail of the queue. */

Source from the content-addressed store, hash-verified

86 * at the tail of the queue.
87 */
88void
89SHMQueueInsertBefore(SHM_QUEUE *queue, SHM_QUEUE *elem)
90{
91 SHM_QUEUE *prevPtr = queue->prev;
92
93 Assert(ShmemAddrIsValid(queue));
94 Assert(ShmemAddrIsValid(elem));
95
96 elem->next = prevPtr->next;
97 elem->prev = queue->prev;
98 queue->prev = elem;
99 prevPtr->next = elem;
100}
101
102/*
103 * SHMQueueInsertAfter -- put elem in queue after the given queue

Callers 15

ResLockAcquireFunction · 0.85
ResIncrementAddFunction · 0.85
groupWaitQueuePushFunction · 0.85
SetupLockInTableFunction · 0.85
PostPrepare_LocksFunction · 0.85
lock_twophase_recoverFunction · 0.85
CreatePredXactFunction · 0.85
ReleasePredXactFunction · 0.85
SetRWConflictFunction · 0.85
ReleaseRWConflictFunction · 0.85
InitPredicateLocksFunction · 0.85

Calls 1

ShmemAddrIsValidFunction · 0.85

Tested by

no test coverage detected