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-2023, 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
/*
19
* A node in a doubly-linked list of processes. The link fields contain
20
* the 0-based PGPROC indexes of the next and previous process, or
21
* INVALID_PGPROCNO in the next-link of the last node and the prev-link
22
* of the first node. A node that is currently not in any list
23
* should have next == prev == 0; this is not a possible state for a node
24
* that is in a list, because we disallow circularity.
25
*/
26
typedef
struct
proclist_node
27
{
28
int
next
;
/* pgprocno of the next PGPROC */
29
int
prev
;
/* pgprocno of the prev PGPROC */
30
}
proclist_node
;
31
32
/*
33
* Header of a doubly-linked list of PGPROCs, identified by pgprocno.
34
* An empty list is represented by head == tail == INVALID_PGPROCNO.
35
*/
36
typedef
struct
proclist_head
37
{
38
int
head
;
/* pgprocno of the head PGPROC */
39
int
tail
;
/* pgprocno of the tail PGPROC */
40
}
proclist_head
;
41
42
/*
43
* List iterator allowing some modifications while iterating.
44
*/
45
typedef
struct
proclist_mutable_iter
46
{
47
int
cur
;
/* pgprocno of the current PGPROC */
48
int
next
;
/* pgprocno of the next PGPROC */
49
}
proclist_mutable_iter
;
50
51
#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
proclist_head
Definition:
proclist_types.h:37
proclist_head::tail
int tail
Definition:
proclist_types.h:39
proclist_head::head
int head
Definition:
proclist_types.h:38
proclist_mutable_iter
Definition:
proclist_types.h:46
proclist_mutable_iter::next
int next
Definition:
proclist_types.h:48
proclist_mutable_iter::cur
int cur
Definition:
proclist_types.h:47
proclist_node
Definition:
proclist_types.h:27
proclist_node::next
int next
Definition:
proclist_types.h:28
proclist_node::prev
int prev
Definition:
proclist_types.h:29
src
include
storage
proclist_types.h
Generated on Thu Jun 1 2023 12:13:23 for PostgreSQL Source Code by
1.9.1