PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cancel.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * Query cancellation support for frontend code
4  *
5  *
6  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/fe_utils/cancel.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 
14 #ifndef CANCEL_H
15 #define CANCEL_H
16 
17 #include <signal.h>
18 
19 #include "libpq-fe.h"
20 
21 extern PGDLLIMPORT volatile sig_atomic_t CancelRequested;
22 
23 extern void SetCancelConn(PGconn *conn);
24 extern void ResetCancelConn(void);
25 
26 /*
27  * A callback can be optionally set up to be called at cancellation
28  * time.
29  */
30 extern void setup_cancel_handler(void (*query_cancel_callback) (void));
31 
32 #endif /* CANCEL_H */
#define PGDLLIMPORT
Definition: c.h:1321
void ResetCancelConn(void)
Definition: cancel.c:107
PGDLLIMPORT volatile sig_atomic_t CancelRequested
Definition: cancel.c:59
void SetCancelConn(PGconn *conn)
Definition: cancel.c:77
void setup_cancel_handler(void(*query_cancel_callback)(void))
Definition: cancel.c:183
PGconn * conn
Definition: streamutil.c:53