* SHMQueueInsertBefore -- put elem in queue before the given queue * element. Inserting "before" the queue head puts the elem * at the tail of the queue. */
| 86 | * at the tail of the queue. |
| 87 | */ |
| 88 | void |
| 89 | SHMQueueInsertBefore(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 |
no test coverage detected