aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-09-27 09:29:56 +0900
committerMichael Paquier <michael@paquier.xyz>2022-09-27 09:29:56 +0900
commit78fdb1e50f7fd394505a400b507f70ecffa6d7bf (patch)
tree02f9a40f9ec2c2740f2c7d09ee638733d2cc3967 /src
parente1e6f8f3dfe141839220875270a81ad3a719e0b6 (diff)
downloadpostgresql-78fdb1e50f7fd394505a400b507f70ecffa6d7bf.tar.gz
postgresql-78fdb1e50f7fd394505a400b507f70ecffa6d7bf.zip
Mark ParallelMessagePending as sig_atomic_t
ParallelMessagePending was previously marked as a boolean which should be fine on modern platforms, but the C standard recommends the use of sig_atomic_t for variables manipulated in signal handlers. Author: Hayato Kuroda Discussion: https://postgr.es/m/TYAPR01MB58667C15A95A234720F4F876F5529@TYAPR01MB5866.jpnprd01.prod.outlook.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/parallel.c2
-rw-r--r--src/include/access/parallel.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index bc93101ff71..8cba8882239 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -113,7 +113,7 @@ typedef struct FixedParallelState
int ParallelWorkerNumber = -1;
/* Is there a parallel message pending which we need to receive? */
-volatile bool ParallelMessagePending = false;
+volatile sig_atomic_t ParallelMessagePending = false;
/* Are we initializing a parallel worker? */
bool InitializingParallelWorker = false;
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h
index 983841d45e8..1ec8e33af45 100644
--- a/src/include/access/parallel.h
+++ b/src/include/access/parallel.h
@@ -54,7 +54,7 @@ typedef struct ParallelWorkerContext
shm_toc *toc;
} ParallelWorkerContext;
-extern PGDLLIMPORT volatile bool ParallelMessagePending;
+extern PGDLLIMPORT volatile sig_atomic_t ParallelMessagePending;
extern PGDLLIMPORT int ParallelWorkerNumber;
extern PGDLLIMPORT bool InitializingParallelWorker;