PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ilist.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dlist_node
 
struct  dlist_head
 
struct  dlist_iter
 
struct  dlist_mutable_iter
 
struct  slist_node
 
struct  slist_head
 
struct  slist_iter
 
struct  slist_mutable_iter
 

Macros

#define DLIST_STATIC_INIT(name)   {{&(name).head, &(name).head}}
 
#define SLIST_STATIC_INIT(name)   {{NULL}}
 
#define dlist_check(head)   ((void) (head))
 
#define slist_check(head)   ((void) (head))
 
#define dlist_container(type, membername, ptr)
 
#define dlist_head_element(type, membername, lhead)
 
#define dlist_tail_element(type, membername, lhead)
 
#define dlist_foreach(iter, lhead)
 
#define dlist_foreach_modify(iter, lhead)
 
#define dlist_reverse_foreach(iter, lhead)
 
#define slist_container(type, membername, ptr)
 
#define slist_head_element(type, membername, lhead)
 
#define slist_foreach(iter, lhead)
 
#define slist_foreach_modify(iter, lhead)
 

Typedefs

typedef struct dlist_node dlist_node
 
typedef struct dlist_head dlist_head
 
typedef struct dlist_iter dlist_iter
 
typedef struct dlist_mutable_iter dlist_mutable_iter
 
typedef struct slist_node slist_node
 
typedef struct slist_head slist_head
 
typedef struct slist_iter slist_iter
 
typedef struct slist_mutable_iter slist_mutable_iter
 

Functions

void slist_delete (slist_head *head, slist_node *node)
 
static void dlist_init (dlist_head *head)
 
static bool dlist_is_empty (dlist_head *head)
 
static void dlist_push_head (dlist_head *head, dlist_node *node)
 
static void dlist_push_tail (dlist_head *head, dlist_node *node)
 
static void dlist_insert_after (dlist_node *after, dlist_node *node)
 
static void dlist_insert_before (dlist_node *before, dlist_node *node)
 
static void dlist_delete (dlist_node *node)
 
static dlist_nodedlist_pop_head_node (dlist_head *head)
 
static void dlist_move_head (dlist_head *head, dlist_node *node)
 
static bool dlist_has_next (dlist_head *head, dlist_node *node)
 
static bool dlist_has_prev (dlist_head *head, dlist_node *node)
 
static dlist_nodedlist_next_node (dlist_head *head, dlist_node *node)
 
static dlist_nodedlist_prev_node (dlist_head *head, dlist_node *node)
 
static void * dlist_head_element_off (dlist_head *head, size_t off)
 
static dlist_nodedlist_head_node (dlist_head *head)
 
static void * dlist_tail_element_off (dlist_head *head, size_t off)
 
static dlist_nodedlist_tail_node (dlist_head *head)
 
static void slist_init (slist_head *head)
 
static bool slist_is_empty (slist_head *head)
 
static void slist_push_head (slist_head *head, slist_node *node)
 
static void slist_insert_after (slist_node *after, slist_node *node)
 
static slist_nodeslist_pop_head_node (slist_head *head)
 
static bool slist_has_next (slist_head *head, slist_node *node)
 
static slist_nodeslist_next_node (slist_head *head, slist_node *node)
 
static void * slist_head_element_off (slist_head *head, size_t off)
 
static slist_nodeslist_head_node (slist_head *head)
 
static void slist_delete_current (slist_mutable_iter *iter)
 

Macro Definition Documentation

#define dlist_check (   head)    ((void) (head))

Definition at line 267 of file ilist.h.

Referenced by dlist_is_empty(), dlist_move_head(), dlist_push_head(), and dlist_push_tail().

#define dlist_container (   type,
  membername,
  ptr 
)
Value:
AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \
((type *) ((char *) (ptr) - offsetof(type, membername))))
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
#define NULL
Definition: c.h:226
#define offsetof(type, field)
Definition: c.h:551

Definition at line 477 of file ilist.h.

Referenced by addItemsToLeaf(), AssertTXNLsnOrder(), AtEOXact_CatCache(), autovac_balance_cost(), CatalogCacheIdInvalidate(), CleanupBackend(), computeLeafRecompressWALData(), CountChildren(), dataBeginPlaceToPageLeaf(), dataPlaceToPageLeafRecompress(), dataPlaceToPageLeafSplit(), do_autovacuum(), do_start_worker(), dsm_attach(), dsm_find_mapping(), FindLockCycleRecurse(), get_flush_position(), GetBlockerStatusData(), ginVacuumPostingTreeLeaf(), HandleChildCrash(), HandleParallelMessages(), InvalidateConstraintCacheCallBack(), launch_worker(), leafRepackItems(), logical_heap_rewrite_flush_mappings(), mXactCacheGetById(), mXactCacheGetBySet(), mXactCachePut(), PostmasterMarkPIDForWorkerNotify(), processCancelRequest(), rebuild_database_list(), RehashCatCache(), ReorderBufferAbortOld(), ReorderBufferBuildTupleCidHash(), ReorderBufferCleanupTXN(), ReorderBufferCopySnap(), ReorderBufferIterTXNFinish(), ReorderBufferIterTXNInit(), ReorderBufferIterTXNNext(), ReorderBufferRestoreChanges(), ReorderBufferSerializeTXN(), ReorderBufferToastReplace(), ReorderBufferToastReset(), reset_on_dsm_detach(), ResetCatalogCache(), SearchCatCache(), SearchCatCacheList(), SignalSomeChildren(), SlabReset(), SlabStats(), and SnapBuildDistributeNewCatalogSnapshot().

#define dlist_foreach_modify (   iter,
  lhead 
)
Value:
(iter).end = &(lhead)->head, \
(iter).cur = (iter).end->next ? (iter).end->next : (iter).end, \
(iter).next = (iter).cur->next; \
(iter).cur != (iter).end; \
(iter).cur = (iter).next, (iter).next = (iter).cur->next)
struct cursor * next
Definition: type.h:136
struct cursor * cur
Definition: ecpg.c:28
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782

Definition at line 524 of file ilist.h.

Referenced by CatalogCacheIdInvalidate(), CleanupBackend(), get_flush_position(), HandleChildCrash(), InvalidateConstraintCacheCallBack(), logical_heap_rewrite_flush_mappings(), RehashCatCache(), ReorderBufferAbortOld(), ReorderBufferCleanupTXN(), ReorderBufferRestoreChanges(), ReorderBufferSerializeTXN(), ReorderBufferToastReset(), ResetCatalogCache(), and SlabReset().

#define dlist_head_element (   type,
  membername,
  lhead 
)
Value:
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \
(type *) dlist_head_element_off(lhead, offsetof(type, membername)))
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
#define NULL
Definition: c.h:226
static void * dlist_head_element_off(dlist_head *head, size_t off)
Definition: ilist.h:439
#define offsetof(type, field)
Definition: c.h:551

Definition at line 487 of file ilist.h.

Referenced by AtEOSubXact_Parallel(), AtEOXact_Parallel(), dsm_backend_shutdown(), dsm_detach_all(), ReorderBufferGetOldestTXN(), ReorderBufferIterTXNInit(), ReorderBufferIterTXNNext(), and SlabAlloc().

#define dlist_reverse_foreach (   iter,
  lhead 
)
Value:
(iter).end = &(lhead)->head, \
(iter).cur = (iter).end->prev ? (iter).end->prev : (iter).end; \
(iter).cur != (iter).end; \
(iter).cur = (iter).cur->prev)
struct cursor * cur
Definition: ecpg.c:28
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782

Definition at line 538 of file ilist.h.

Referenced by do_start_worker().

#define DLIST_STATIC_INIT (   name)    {{&(name).head, &(name).head}}

Definition at line 248 of file ilist.h.

#define dlist_tail_element (   type,
  membername,
  lhead 
)
Value:
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \
((type *) dlist_tail_element_off(lhead, offsetof(type, membername))))
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
static void * dlist_tail_element_off(dlist_head *head, size_t off)
Definition: ilist.h:456
#define NULL
Definition: c.h:226
#define offsetof(type, field)
Definition: c.h:551

Definition at line 496 of file ilist.h.

Referenced by AutoVacLauncherMain(), get_flush_position(), and launcher_determine_sleep().

#define slist_check (   head)    ((void) (head))
#define slist_foreach (   iter,
  lhead 
)
Value:
(iter).cur = (lhead)->head.next; \
(iter).cur != NULL; \
(iter).cur = (iter).cur->next)
struct cursor * next
Definition: type.h:136
struct cursor * cur
Definition: ecpg.c:28
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
#define NULL
Definition: c.h:226

Definition at line 700 of file ilist.h.

Referenced by AtEOXact_CatCache(), BackgroundWorkerShmemInit(), BackgroundWorkerStopNotifications(), CatalogCacheFlushCatalog(), CatalogCacheIdInvalidate(), CleanupBackgroundWorker(), FindRegisteredWorkerBySlotNumber(), HandleChildCrash(), pg_event_trigger_dropped_objects(), PrepareToInvalidateCacheTuple(), and ResetCatalogCaches().

#define slist_foreach_modify (   iter,
  lhead 
)
Value:
(iter).prev = &(lhead)->head, \
(iter).cur = (iter).prev->next, \
(iter).next = (iter).cur ? (iter).cur->next : NULL; \
(iter).cur != NULL; \
(iter).prev = (iter).cur, \
(iter).cur = (iter).next, \
(iter).next = (iter).next ? (iter).next->next : NULL)
struct cursor * next
Definition: type.h:136
struct cursor * cur
Definition: ecpg.c:28
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
#define NULL
Definition: c.h:226

Definition at line 716 of file ilist.h.

Referenced by AtEOSubXact_SPI(), cancel_on_dsm_detach(), DetermineSleepTime(), maybe_start_bgworker(), ResetBackgroundWorkerCrashTimes(), and SPI_freetuptable().

#define slist_head_element (   type,
  membername,
  lhead 
)
Value:
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node), \
(type *) slist_head_element_off(lhead, offsetof(type, membername)))
#define AssertVariableIsOfTypeMacro(varname, typename)
Definition: c.h:782
static void * slist_head_element_off(slist_head *head, size_t off)
Definition: ilist.h:630
#define NULL
Definition: c.h:226
#define offsetof(type, field)
Definition: c.h:551

Definition at line 684 of file ilist.h.

#define SLIST_STATIC_INIT (   name)    {{NULL}}

Definition at line 249 of file ilist.h.

Typedef Documentation

Definition at line 120 of file ilist.h.

Definition at line 190 of file ilist.h.

Function Documentation

static bool dlist_has_next ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 402 of file ilist.h.

References dlist_head::head, and dlist_node::next.

Referenced by addItemsToLeaf(), dataPlaceToPageLeafSplit(), dlist_next_node(), leafRepackItems(), and ReorderBufferIterTXNNext().

403 {
404  return node->next != &head->head;
405 }
dlist_node * next
Definition: ilist.h:124
dlist_node head
Definition: ilist.h:144
static bool dlist_has_prev ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 412 of file ilist.h.

References dlist_head::head, and dlist_node::prev.

Referenced by dataBeginPlaceToPageLeaf(), and dlist_prev_node().

413 {
414  return node->prev != &head->head;
415 }
dlist_node * prev
Definition: ilist.h:123
dlist_node head
Definition: ilist.h:144
static void* dlist_head_element_off ( dlist_head head,
size_t  off 
)
inlinestatic

Definition at line 439 of file ilist.h.

References Assert, dlist_is_empty(), dlist_head::head, and dlist_node::next.

Referenced by dlist_head_node().

440 {
441  Assert(!dlist_is_empty(head));
442  return (char *) head->head.next - off;
443 }
dlist_node * next
Definition: ilist.h:124
#define Assert(condition)
Definition: c.h:671
static bool dlist_is_empty(dlist_head *head)
Definition: ilist.h:289
dlist_node head
Definition: ilist.h:144
static dlist_node* dlist_head_node ( dlist_head head)
inlinestatic

Definition at line 449 of file ilist.h.

References dlist_head_element_off().

Referenced by dataPlaceToPageLeafSplit(), and leafRepackItems().

450 {
451  return (dlist_node *) dlist_head_element_off(head, 0);
452 }
static void * dlist_head_element_off(dlist_head *head, size_t off)
Definition: ilist.h:439
static void dlist_insert_after ( dlist_node after,
dlist_node node 
)
inlinestatic

Definition at line 334 of file ilist.h.

References dlist_node::next, and dlist_node::prev.

Referenced by leafRepackItems().

335 {
336  node->prev = after;
337  node->next = after->next;
338  after->next = node;
339  node->next->prev = node;
340 }
dlist_node * next
Definition: ilist.h:124
dlist_node * prev
Definition: ilist.h:123
static void dlist_insert_before ( dlist_node before,
dlist_node node 
)
inlinestatic

Definition at line 346 of file ilist.h.

References before(), dlist_node::next, and dlist_node::prev.

347 {
348  node->prev = before->prev;
349  node->next = before;
350  before->prev = node;
351  node->prev->next = node;
352 }
dlist_node * next
Definition: ilist.h:124
static int before(chr x, chr y)
Definition: regc_locale.c:496
dlist_node * prev
Definition: ilist.h:123
static void dlist_move_head ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 385 of file ilist.h.

References dlist_check, dlist_delete(), dlist_push_head(), dlist_head::head, and dlist_node::next.

Referenced by launch_worker(), mXactCacheGetById(), mXactCacheGetBySet(), SearchCatCache(), and SearchCatCacheList().

386 {
387  /* fast path if it's already at the head */
388  if (head->head.next == node)
389  return;
390 
391  dlist_delete(node);
392  dlist_push_head(head, node);
393 
394  dlist_check(head);
395 }
static void dlist_push_head(dlist_head *head, dlist_node *node)
Definition: ilist.h:300
dlist_node * next
Definition: ilist.h:124
static void dlist_delete(dlist_node *node)
Definition: ilist.h:358
#define dlist_check(head)
Definition: ilist.h:267
dlist_node head
Definition: ilist.h:144
static dlist_node* dlist_next_node ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 421 of file ilist.h.

References Assert, dlist_has_next(), and dlist_node::next.

Referenced by addItemsToLeaf(), dataPlaceToPageLeafSplit(), leafRepackItems(), and ReorderBufferIterTXNNext().

422 {
423  Assert(dlist_has_next(head, node));
424  return node->next;
425 }
dlist_node * next
Definition: ilist.h:124
static bool dlist_has_next(dlist_head *head, dlist_node *node)
Definition: ilist.h:402
#define Assert(condition)
Definition: c.h:671
static dlist_node* dlist_pop_head_node ( dlist_head head)
inlinestatic

Definition at line 368 of file ilist.h.

References Assert, dlist_delete(), dlist_is_empty(), dlist_head::head, and dlist_node::next.

Referenced by do_start_worker(), ReorderBufferIterTXNFinish(), and ReorderBufferIterTXNNext().

369 {
370  dlist_node *node;
371 
372  Assert(!dlist_is_empty(head));
373  node = head->head.next;
374  dlist_delete(node);
375  return node;
376 }
dlist_node * next
Definition: ilist.h:124
static void dlist_delete(dlist_node *node)
Definition: ilist.h:358
#define Assert(condition)
Definition: c.h:671
static bool dlist_is_empty(dlist_head *head)
Definition: ilist.h:289
dlist_node head
Definition: ilist.h:144
static dlist_node* dlist_prev_node ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 431 of file ilist.h.

References Assert, dlist_has_prev(), and dlist_node::prev.

Referenced by dataBeginPlaceToPageLeaf(), and leafRepackItems().

432 {
433  Assert(dlist_has_prev(head, node));
434  return node->prev;
435 }
#define Assert(condition)
Definition: c.h:671
dlist_node * prev
Definition: ilist.h:123
static bool dlist_has_prev(dlist_head *head, dlist_node *node)
Definition: ilist.h:412
static void dlist_push_head ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 300 of file ilist.h.

References dlist_check, dlist_init(), dlist_head::head, dlist_node::next, NULL, and dlist_node::prev.

Referenced by AutoVacLauncherMain(), AutoVacuumShmemInit(), AutoVacWorkerMain(), BackendStartup(), BecomeLockGroupLeader(), CatalogCacheCreateEntry(), CreateParallelContext(), dlist_move_head(), dsm_create_descriptor(), FreeWorkerInfo(), maybe_start_bgworker(), mXactCachePut(), rebuild_database_list(), RehashCatCache(), SearchCatCacheList(), SlabAlloc(), SlabFree(), and StartAutovacuumWorker().

301 {
302  if (head->head.next == NULL) /* convert NULL header to circular */
303  dlist_init(head);
304 
305  node->next = head->head.next;
306  node->prev = &head->head;
307  node->next->prev = node;
308  head->head.next = node;
309 
310  dlist_check(head);
311 }
dlist_node * next
Definition: ilist.h:124
static void dlist_init(dlist_head *head)
Definition: ilist.h:278
#define NULL
Definition: c.h:226
dlist_node * prev
Definition: ilist.h:123
#define dlist_check(head)
Definition: ilist.h:267
dlist_node head
Definition: ilist.h:144
static void dlist_push_tail ( dlist_head head,
dlist_node node 
)
inlinestatic

Definition at line 317 of file ilist.h.

References dlist_check, dlist_init(), dlist_head::head, dlist_node::next, NULL, and dlist_node::prev.

Referenced by addItemsToLeaf(), BecomeLockGroupMember(), disassembleLeaf(), logical_rewrite_log_mapping(), ReorderBufferAddNewTupleCids(), ReorderBufferAssignChild(), ReorderBufferCommitChild(), ReorderBufferIterTXNNext(), ReorderBufferQueueChange(), ReorderBufferRestoreChange(), ReorderBufferToastAppendChunk(), ReorderBufferTXNByXid(), ri_LoadConstraintInfo(), and store_flush_position().

318 {
319  if (head->head.next == NULL) /* convert NULL header to circular */
320  dlist_init(head);
321 
322  node->next = &head->head;
323  node->prev = head->head.prev;
324  node->prev->next = node;
325  head->head.prev = node;
326 
327  dlist_check(head);
328 }
dlist_node * next
Definition: ilist.h:124
static void dlist_init(dlist_head *head)
Definition: ilist.h:278
#define NULL
Definition: c.h:226
dlist_node * prev
Definition: ilist.h:123
#define dlist_check(head)
Definition: ilist.h:267
dlist_node head
Definition: ilist.h:144
static void* dlist_tail_element_off ( dlist_head head,
size_t  off 
)
inlinestatic

Definition at line 456 of file ilist.h.

References Assert, dlist_is_empty(), dlist_head::head, and dlist_node::prev.

Referenced by dlist_tail_node().

457 {
458  Assert(!dlist_is_empty(head));
459  return (char *) head->head.prev - off;
460 }
#define Assert(condition)
Definition: c.h:671
dlist_node * prev
Definition: ilist.h:123
static bool dlist_is_empty(dlist_head *head)
Definition: ilist.h:289
dlist_node head
Definition: ilist.h:144
static dlist_node* dlist_tail_node ( dlist_head head)
inlinestatic

Definition at line 466 of file ilist.h.

References dlist_tail_element_off().

Referenced by dataBeginPlaceToPageLeaf(), and mXactCachePut().

467 {
468  return (dlist_node *) dlist_tail_element_off(head, 0);
469 }
static void * dlist_tail_element_off(dlist_head *head, size_t off)
Definition: ilist.h:456
void slist_delete ( slist_head head,
slist_node node 
)

Definition at line 31 of file ilist.c.

References Assert, cur, slist_head::head, slist_node::next, NULL, PG_USED_FOR_ASSERTS_ONLY, and slist_check.

32 {
33  slist_node *last = &head->head;
34  slist_node *cur;
35  bool found PG_USED_FOR_ASSERTS_ONLY = false;
36 
37  while ((cur = last->next) != NULL)
38  {
39  if (cur == node)
40  {
41  last->next = cur->next;
42 #ifdef USE_ASSERT_CHECKING
43  found = true;
44 #endif
45  break;
46  }
47  last = cur;
48  }
49  Assert(found);
50 
51  slist_check(head);
52 }
slist_node head
Definition: ilist.h:205
struct cursor * cur
Definition: ecpg.c:28
#define slist_check(head)
Definition: ilist.h:268
slist_node * next
Definition: ilist.h:193
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
#define PG_USED_FOR_ASSERTS_ONLY
Definition: c.h:986
static void slist_delete_current ( slist_mutable_iter iter)
inlinestatic

Definition at line 652 of file ilist.h.

References slist_mutable_iter::cur, slist_node::next, slist_mutable_iter::next, and slist_mutable_iter::prev.

Referenced by AtEOSubXact_SPI(), cancel_on_dsm_detach(), ForgetBackgroundWorker(), and SPI_freetuptable().

653 {
654  /*
655  * Update previous element's forward link. If the iteration is at the
656  * first list element, iter->prev will point to the list header's "head"
657  * field, so we don't need a special case for that.
658  */
659  iter->prev->next = iter->next;
660 
661  /*
662  * Reset cur to prev, so that prev will continue to point to the prior
663  * valid list element after slist_foreach_modify() advances to the next.
664  */
665  iter->cur = iter->prev;
666 }
slist_node * next
Definition: ilist.h:242
slist_node * cur
Definition: ilist.h:241
slist_node * next
Definition: ilist.h:193
slist_node * prev
Definition: ilist.h:243
static bool slist_has_next ( slist_head head,
slist_node node 
)
inlinestatic

Definition at line 611 of file ilist.h.

References slist_node::next, NULL, and slist_check.

Referenced by slist_next_node().

612 {
613  slist_check(head);
614 
615  return node->next != NULL;
616 }
#define slist_check(head)
Definition: ilist.h:268
slist_node * next
Definition: ilist.h:193
#define NULL
Definition: c.h:226
static void* slist_head_element_off ( slist_head head,
size_t  off 
)
inlinestatic

Definition at line 630 of file ilist.h.

References Assert, slist_head::head, slist_node::next, and slist_is_empty().

Referenced by slist_head_node().

631 {
632  Assert(!slist_is_empty(head));
633  return (char *) head->head.next - off;
634 }
slist_node head
Definition: ilist.h:205
static bool slist_is_empty(slist_head *head)
Definition: ilist.h:563
slist_node * next
Definition: ilist.h:193
#define Assert(condition)
Definition: c.h:671
static slist_node* slist_head_node ( slist_head head)
inlinestatic

Definition at line 640 of file ilist.h.

References slist_head_element_off().

641 {
642  return (slist_node *) slist_head_element_off(head, 0);
643 }
static void * slist_head_element_off(slist_head *head, size_t off)
Definition: ilist.h:630
static void slist_init ( slist_head head)
inlinestatic

Definition at line 554 of file ilist.h.

References slist_head::head, slist_node::next, and NULL.

Referenced by dsm_create_descriptor(), EventTriggerBeginCompleteQuery(), InitCatCache(), ReorderBufferAllocate(), and SPI_connect().

555 {
556  head->head.next = NULL;
557 }
slist_node head
Definition: ilist.h:205
slist_node * next
Definition: ilist.h:193
#define NULL
Definition: c.h:226
static void slist_insert_after ( slist_node after,
slist_node node 
)
inlinestatic

Definition at line 586 of file ilist.h.

References slist_node::next.

587 {
588  node->next = after->next;
589  after->next = node;
590 }
slist_node * next
Definition: ilist.h:193
static bool slist_is_empty ( slist_head head)
inlinestatic

Definition at line 563 of file ilist.h.

References slist_head::head, slist_node::next, NULL, and slist_check.

Referenced by dsm_detach(), EventTriggerSQLDrop(), reset_on_dsm_detach(), slist_head_element_off(), and slist_pop_head_node().

564 {
565  slist_check(head);
566 
567  return head->head.next == NULL;
568 }
slist_node head
Definition: ilist.h:205
#define slist_check(head)
Definition: ilist.h:268
slist_node * next
Definition: ilist.h:193
#define NULL
Definition: c.h:226
static slist_node* slist_next_node ( slist_head head,
slist_node node 
)
inlinestatic

Definition at line 622 of file ilist.h.

References Assert, slist_node::next, and slist_has_next().

623 {
624  Assert(slist_has_next(head, node));
625  return node->next;
626 }
static bool slist_has_next(slist_head *head, slist_node *node)
Definition: ilist.h:611
slist_node * next
Definition: ilist.h:193
#define Assert(condition)
Definition: c.h:671
static slist_node* slist_pop_head_node ( slist_head head)
inlinestatic

Definition at line 596 of file ilist.h.

References Assert, slist_head::head, slist_node::next, slist_check, and slist_is_empty().

Referenced by dsm_detach(), ReorderBufferGetTupleBuf(), and reset_on_dsm_detach().

597 {
598  slist_node *node;
599 
600  Assert(!slist_is_empty(head));
601  node = head->head.next;
602  head->head.next = node->next;
603  slist_check(head);
604  return node;
605 }
slist_node head
Definition: ilist.h:205
static bool slist_is_empty(slist_head *head)
Definition: ilist.h:563
#define slist_check(head)
Definition: ilist.h:268
slist_node * next
Definition: ilist.h:193
#define Assert(condition)
Definition: c.h:671
static void slist_push_head ( slist_head head,
slist_node node 
)
inlinestatic

Definition at line 574 of file ilist.h.

References slist_head::head, slist_node::next, and slist_check.

Referenced by BackgroundWorkerStateChange(), EventTriggerSQLDropAddObject(), InitCatCache(), on_dsm_detach(), RegisterBackgroundWorker(), ReorderBufferReturnTupleBuf(), and spi_dest_startup().

575 {
576  node->next = head->head.next;
577  head->head.next = node;
578 
579  slist_check(head);
580 }
slist_node head
Definition: ilist.h:205
#define slist_check(head)
Definition: ilist.h:268
slist_node * next
Definition: ilist.h:193