PostgreSQL Source Code
git master
proclist_types.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* proclist_types.h
4
* doubly-linked lists of pgprocnos
5
*
6
* See proclist.h for functions that operate on these types.
7
*
8
* Portions Copyright (c) 2016-2024, PostgreSQL Global Development Group
9
*
10
* IDENTIFICATION
11
* src/include/storage/proclist_types.h
12
*-------------------------------------------------------------------------
13
*/
14
15
#ifndef PROCLIST_TYPES_H
16
#define PROCLIST_TYPES_H
17
18
#include "
storage/procnumber.h
"
19
20
/*
21
* A node in a doubly-linked list of processes. The link fields contain
22
* the 0-based PGPROC indexes of the next and previous process, or
23
* INVALID_PROC_NUMBER in the next-link of the last node and the prev-link
24
* of the first node. A node that is currently not in any list
25
* should have next == prev == 0; this is not a possible state for a node
26
* that is in a list, because we disallow circularity.
27
*/
28
typedef
struct
proclist_node
29
{
30
ProcNumber
next
;
/* pgprocno of the next PGPROC */
31
ProcNumber
prev
;
/* pgprocno of the prev PGPROC */
32
}
proclist_node
;
33
34
/*
35
* Header of a doubly-linked list of PGPROCs, identified by pgprocno.
36
* An empty list is represented by head == tail == INVALID_PROC_NUMBER.
37
*/
38
typedef
struct
proclist_head
39
{
40
ProcNumber
head
;
/* pgprocno of the head PGPROC */
41
ProcNumber
tail
;
/* pgprocno of the tail PGPROC */
42
}
proclist_head
;
43
44
/*
45
* List iterator allowing some modifications while iterating.
46
*/
47
typedef
struct
proclist_mutable_iter
48
{
49
ProcNumber
cur
;
/* pgprocno of the current PGPROC */
50
ProcNumber
next
;
/* pgprocno of the next PGPROC */
51
}
proclist_mutable_iter
;
52
53
#endif
/* PROCLIST_TYPES_H */
proclist_head
struct proclist_head proclist_head
proclist_node
struct proclist_node proclist_node
proclist_mutable_iter
struct proclist_mutable_iter proclist_mutable_iter
procnumber.h
ProcNumber
int ProcNumber
Definition:
procnumber.h:24
proclist_head
Definition:
proclist_types.h:39
proclist_head::head
ProcNumber head
Definition:
proclist_types.h:40
proclist_head::tail
ProcNumber tail
Definition:
proclist_types.h:41
proclist_mutable_iter
Definition:
proclist_types.h:48
proclist_mutable_iter::next
ProcNumber next
Definition:
proclist_types.h:50
proclist_mutable_iter::cur
ProcNumber cur
Definition:
proclist_types.h:49
proclist_node
Definition:
proclist_types.h:29
proclist_node::prev
ProcNumber prev
Definition:
proclist_types.h:31
proclist_node::next
ProcNumber next
Definition:
proclist_types.h:30
src
include
storage
proclist_types.h
Generated on Sun Dec 8 2024 06:13:25 for PostgreSQL Source Code by
1.9.1