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
This commit is contained in:
Michael Paquier 2022-09-27 09:29:56 +09:00
parent e1e6f8f3df
commit 78fdb1e50f
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;