Go to the source code of this file.
#define dlist_container | ( | type, | ||
membername, | ||||
ptr | ||||
) |
(AssertVariableIsOfTypeMacro(ptr, dlist_node *), \ AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \ ((type *) ((char *) (ptr) - offsetof(type, membername))))
Definition at line 497 of file ilist.h.
Referenced by AtEOXact_CatCache(), autovac_balance_cost(), CatalogCacheIdInvalidate(), CleanupBackend(), CountChildren(), do_autovacuum(), do_start_worker(), HandleChildCrash(), launch_worker(), processCancelRequest(), rebuild_database_list(), ResetCatalogCache(), SearchCatCache(), SearchCatCacheList(), and SignalSomeChildren().
#define dlist_foreach | ( | iter, | ||
lhead | ||||
) |
for (AssertVariableIsOfTypeMacro(iter, dlist_iter), \ AssertVariableIsOfTypeMacro(lhead, dlist_head *), \ (iter).end = &(lhead)->head, \ (iter).cur = (iter).end->next ? (iter).end->next : (iter).end; \ (iter).cur != (iter).end; \ (iter).cur = (iter).cur->next)
Definition at line 527 of file ilist.h.
Referenced by AtEOXact_CatCache(), autovac_balance_cost(), CountChildren(), do_autovacuum(), launch_worker(), processCancelRequest(), rebuild_database_list(), SearchCatCache(), SearchCatCacheList(), and SignalSomeChildren().
#define dlist_foreach_modify | ( | iter, | ||
lhead | ||||
) |
for (AssertVariableIsOfTypeMacro(iter, dlist_mutable_iter), \ AssertVariableIsOfTypeMacro(lhead, dlist_head *), \ (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)
Definition at line 544 of file ilist.h.
Referenced by CatalogCacheIdInvalidate(), CleanupBackend(), HandleChildCrash(), and ResetCatalogCache().
#define dlist_head_element | ( | type, | ||
membername, | ||||
lhead | ||||
) |
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \ (type *) dlist_head_element_off(lhead, offsetof(type, membername)))
#define dlist_reverse_foreach | ( | iter, | ||
lhead | ||||
) |
for (AssertVariableIsOfTypeMacro(iter, dlist_iter), \ AssertVariableIsOfTypeMacro(lhead, dlist_head *), \ (iter).end = &(lhead)->head, \ (iter).cur = (iter).end->prev ? (iter).end->prev : (iter).end; \ (iter).cur != (iter).end; \ (iter).cur = (iter).cur->prev)
Definition at line 558 of file ilist.h.
Referenced by do_start_worker().
#define dlist_tail_element | ( | type, | ||
membername, | ||||
lhead | ||||
) |
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node), \ ((type *) dlist_tail_element_off(lhead, offsetof(type, membername))))
Definition at line 516 of file ilist.h.
Referenced by AutoVacLauncherMain(), and launcher_determine_sleep().
#define slist_check | ( | head | ) | ((void) (head)) |
Definition at line 260 of file ilist.h.
Referenced by slist_delete().
#define slist_container | ( | type, | ||
membername, | ||||
ptr | ||||
) |
(AssertVariableIsOfTypeMacro(ptr, slist_node *), \ AssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node), \ ((type *) ((char *) (ptr) - offsetof(type, membername))))
Definition at line 690 of file ilist.h.
Referenced by AtEOXact_CatCache(), CatalogCacheFlushCatalog(), CatalogCacheIdInvalidate(), CleanupBackgroundWorker(), CountUnconnectedWorkers(), DetermineSleepTime(), GetNumRegisteredBackgroundWorkers(), HandleChildCrash(), pg_event_trigger_dropped_objects(), pgstat_db_requested(), pgstat_recv_inquiry(), pgstat_write_statsfiles(), PrepareToInvalidateCacheTuple(), ResetCatalogCaches(), SignalUnconnectedWorkers(), and StartOneBackgroundWorker().
#define slist_foreach | ( | iter, | ||
lhead | ||||
) |
for (AssertVariableIsOfTypeMacro(iter, slist_iter), \ AssertVariableIsOfTypeMacro(lhead, slist_head *), \ (iter).cur = (lhead)->head.next; \ (iter).cur != NULL; \ (iter).cur = (iter).cur->next)
Definition at line 711 of file ilist.h.
Referenced by AtEOXact_CatCache(), CatalogCacheFlushCatalog(), CatalogCacheIdInvalidate(), CleanupBackgroundWorker(), CountUnconnectedWorkers(), DetermineSleepTime(), GetNumRegisteredBackgroundWorkers(), HandleChildCrash(), pg_event_trigger_dropped_objects(), pgstat_db_requested(), pgstat_recv_inquiry(), PrepareToInvalidateCacheTuple(), ResetCatalogCaches(), SignalUnconnectedWorkers(), and StartOneBackgroundWorker().
#define slist_foreach_modify | ( | iter, | ||
lhead | ||||
) |
for (AssertVariableIsOfTypeMacro(iter, slist_mutable_iter), \ AssertVariableIsOfTypeMacro(lhead, slist_head *), \ (iter).cur = (lhead)->head.next, \ (iter).next = (iter).cur ? (iter).cur->next : NULL; \ (iter).cur != NULL; \ (iter).cur = (iter).next, \ (iter).next = (iter).next ? (iter).next->next : NULL)
Definition at line 726 of file ilist.h.
Referenced by pgstat_write_statsfiles().
#define slist_head_element | ( | type, | ||
membername, | ||||
lhead | ||||
) |
(AssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node), \ (type *) slist_head_element_off(lhead, offsetof(type, membername)))
typedef struct dlist_head dlist_head |
typedef struct dlist_iter dlist_iter |
typedef struct dlist_mutable_iter dlist_mutable_iter |
typedef struct dlist_node dlist_node |
typedef struct slist_head slist_head |
typedef struct slist_iter slist_iter |
typedef struct slist_mutable_iter slist_mutable_iter |
typedef struct slist_node slist_node |
void dlist_delete | ( | dlist_node * | node | ) |
Referenced by CatCacheRemoveCList(), CatCacheRemoveCTup(), CleanupBackend(), CleanupBackgroundWorker(), FreeWorkerInfo(), and HandleChildCrash().
bool dlist_has_next | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
bool dlist_has_prev | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
void* dlist_head_element_off | ( | dlist_head * | head, | |
size_t | off | |||
) |
dlist_node* dlist_head_node | ( | dlist_head * | head | ) |
void dlist_init | ( | dlist_head * | head | ) |
Referenced by AutoVacLauncherMain(), AutoVacuumShmemInit(), and rebuild_database_list().
void dlist_insert_after | ( | dlist_node * | after, | |
dlist_node * | node | |||
) |
void dlist_insert_before | ( | dlist_node * | before, | |
dlist_node * | node | |||
) |
bool dlist_is_empty | ( | dlist_head * | head | ) |
Referenced by AutoVacLauncherMain(), do_start_worker(), launcher_determine_sleep(), and PostmasterStateMachine().
void dlist_move_head | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
Referenced by launch_worker(), SearchCatCache(), and SearchCatCacheList().
dlist_node* dlist_next_node | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
dlist_node* dlist_pop_head_node | ( | dlist_head * | head | ) |
Referenced by do_start_worker().
dlist_node* dlist_prev_node | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
void dlist_push_head | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
void dlist_push_tail | ( | dlist_head * | head, | |
dlist_node * | node | |||
) |
void* dlist_tail_element_off | ( | dlist_head * | head, | |
size_t | off | |||
) |
dlist_node* dlist_tail_node | ( | dlist_head * | head | ) |
void slist_delete | ( | slist_head * | head, | |
slist_node * | node | |||
) |
Definition at line 34 of file ilist.c.
References Assert, cur, slist_head::head, slist_node::next, NULL, PG_USED_FOR_ASSERTS_ONLY, and slist_check.
{ slist_node *last = &head->head; slist_node *cur; bool found PG_USED_FOR_ASSERTS_ONLY = false; while ((cur = last->next) != NULL) { if (cur == node) { last->next = cur->next; #ifdef USE_ASSERT_CHECKING found = true; #endif break; } last = cur; } Assert(found); slist_check(head); }
bool slist_has_next | ( | slist_head * | head, | |
slist_node * | node | |||
) |
void* slist_head_element_off | ( | slist_head * | head, | |
size_t | off | |||
) |
slist_node* slist_head_node | ( | slist_head * | head | ) |
void slist_init | ( | slist_head * | head | ) |
Referenced by EventTriggerBeginCompleteQuery(), InitCatCache(), and pgstat_write_statsfiles().
void slist_insert_after | ( | slist_node * | after, | |
slist_node * | node | |||
) |
bool slist_is_empty | ( | slist_head * | head | ) |
Referenced by EventTriggerSQLDrop(), pgstat_write_statsfile_needed(), and pgstat_write_statsfiles().
slist_node* slist_next_node | ( | slist_head * | head, | |
slist_node * | node | |||
) |
slist_node* slist_pop_head_node | ( | slist_head * | head | ) |
void slist_push_head | ( | slist_head * | head, | |
slist_node * | node | |||
) |
Referenced by EventTriggerSQLDropAddObject(), InitCatCache(), pgstat_recv_inquiry(), and RegisterBackgroundWorker().