PostgreSQL Source Code
git master
|
#include "lib/stringinfo.h"
Go to the source code of this file.
Data Structures | |
struct | pairingheap_node |
struct | pairingheap |
Macros | |
#define | pairingheap_container(type, membername, ptr) |
#define | pairingheap_const_container(type, membername, ptr) |
#define | pairingheap_reset(h) ((h)->ph_root = NULL) |
#define | pairingheap_is_empty(h) ((h)->ph_root == NULL) |
#define | pairingheap_is_singular(h) ((h)->ph_root && (h)->ph_root->first_child == NULL) |
Typedefs | |
typedef struct pairingheap_node | pairingheap_node |
typedef int(* | pairingheap_comparator) (const pairingheap_node *a, const pairingheap_node *b, void *arg) |
typedef struct pairingheap | pairingheap |
Functions | |
pairingheap * | pairingheap_allocate (pairingheap_comparator compare, void *arg) |
void | pairingheap_free (pairingheap *heap) |
void | pairingheap_add (pairingheap *heap, pairingheap_node *node) |
pairingheap_node * | pairingheap_first (pairingheap *heap) |
pairingheap_node * | pairingheap_remove_first (pairingheap *heap) |
void | pairingheap_remove (pairingheap *heap, pairingheap_node *node) |
#define pairingheap_const_container | ( | type, | |
membername, | |||
ptr | |||
) |
Definition at line 51 of file pairingheap.h.
#define pairingheap_container | ( | type, | |
membername, | |||
ptr | |||
) |
Definition at line 43 of file pairingheap.h.
#define pairingheap_is_empty | ( | h | ) | ((h)->ph_root == NULL) |
Definition at line 96 of file pairingheap.h.
#define pairingheap_is_singular | ( | h | ) | ((h)->ph_root && (h)->ph_root->first_child == NULL) |
Definition at line 99 of file pairingheap.h.
#define pairingheap_reset | ( | h | ) | ((h)->ph_root = NULL) |
Definition at line 93 of file pairingheap.h.
typedef struct pairingheap pairingheap |
typedef int(* pairingheap_comparator) (const pairingheap_node *a, const pairingheap_node *b, void *arg) |
Definition at line 60 of file pairingheap.h.
typedef struct pairingheap_node pairingheap_node |
void pairingheap_add | ( | pairingheap * | heap, |
pairingheap_node * | node | ||
) |
Definition at line 112 of file pairingheap.c.
References pairingheap_node::first_child, merge(), pairingheap_node::next_sibling, pairingheap::ph_root, and pairingheap_node::prev_or_parent.
Referenced by ExportSnapshot(), GetNonHistoricCatalogSnapshot(), GetTransactionSnapshot(), gistScanPage(), RegisterSnapshotOnOwner(), ReorderBufferChangeMemoryUpdate(), reorderqueue_push(), SetTransactionSnapshot(), and spgAddSearchItemToQueue().
pairingheap* pairingheap_allocate | ( | pairingheap_comparator | compare, |
void * | arg | ||
) |
Definition at line 42 of file pairingheap.c.
References arg, compare(), palloc(), pairingheap::ph_arg, pairingheap::ph_compare, and pairingheap::ph_root.
Referenced by ExecInitIndexScan(), gistrescan(), ReorderBufferAllocate(), and resetSpGistScanOpaque().
pairingheap_node* pairingheap_first | ( | pairingheap * | heap | ) |
Definition at line 130 of file pairingheap.c.
References Assert, pairingheap_is_empty, and pairingheap::ph_root.
Referenced by GetOldestSnapshot(), IndexNextWithReorder(), ReorderBufferLargestTXN(), and SnapshotResetXmin().
void pairingheap_free | ( | pairingheap * | heap | ) |
Definition at line 63 of file pairingheap.c.
References pfree().
void pairingheap_remove | ( | pairingheap * | heap, |
pairingheap_node * | node | ||
) |
Definition at line 170 of file pairingheap.c.
References Assert, pairingheap_node::first_child, merge_children(), pairingheap_node::next_sibling, pairingheap_remove_first(), pairingheap::ph_root, and pairingheap_node::prev_or_parent.
Referenced by AtEOXact_Snapshot(), InvalidateCatalogSnapshot(), ReorderBufferChangeMemoryUpdate(), and UnregisterSnapshotNoOwner().
pairingheap_node* pairingheap_remove_first | ( | pairingheap * | heap | ) |
Definition at line 145 of file pairingheap.c.
References Assert, pairingheap_node::first_child, merge_children(), pairingheap_node::next_sibling, pairingheap_is_empty, pairingheap::ph_root, and pairingheap_node::prev_or_parent.
Referenced by getNextGISTSearchItem(), pairingheap_remove(), reorderqueue_pop(), and spgGetNextQueueItem().