summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/procsignal.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-05-12 13:14:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-05-12 13:14:10 -0400
commitdef5b065ff22a16a80084587613599fe15627213 (patch)
tree13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/storage/ipc/procsignal.c
parente6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff)
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files". The only change worthy of note is that pgindent messed up the formatting of launcher.c's struct LogicalRepWorkerId, which led me to notice that that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/storage/ipc/procsignal.c')
-rw-r--r--src/backend/storage/ipc/procsignal.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c
index eac68951414..defb75aa26a 100644
--- a/src/backend/storage/ipc/procsignal.c
+++ b/src/backend/storage/ipc/procsignal.c
@@ -61,7 +61,7 @@
*/
typedef struct
{
- volatile pid_t pss_pid;
+ volatile pid_t pss_pid;
volatile sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS];
pg_atomic_uint64 pss_barrierGeneration;
pg_atomic_uint32 pss_barrierCheckMask;
@@ -454,7 +454,7 @@ ProcessProcSignalBarrier(void)
{
uint64 local_gen;
uint64 shared_gen;
- volatile uint32 flags;
+ volatile uint32 flags;
Assert(MyProcSignalSlot);
@@ -484,15 +484,15 @@ ProcessProcSignalBarrier(void)
* extract the flags, and that any subsequent state changes happen
* afterward.
*
- * NB: In order to avoid race conditions, we must zero pss_barrierCheckMask
- * first and only afterwards try to do barrier processing. If we did it
- * in the other order, someone could send us another barrier of some
- * type right after we called the barrier-processing function but before
- * we cleared the bit. We would have no way of knowing that the bit needs
- * to stay set in that case, so the need to call the barrier-processing
- * function again would just get forgotten. So instead, we tentatively
- * clear all the bits and then put back any for which we don't manage
- * to successfully absorb the barrier.
+ * NB: In order to avoid race conditions, we must zero
+ * pss_barrierCheckMask first and only afterwards try to do barrier
+ * processing. If we did it in the other order, someone could send us
+ * another barrier of some type right after we called the
+ * barrier-processing function but before we cleared the bit. We would
+ * have no way of knowing that the bit needs to stay set in that case, so
+ * the need to call the barrier-processing function again would just get
+ * forgotten. So instead, we tentatively clear all the bits and then put
+ * back any for which we don't manage to successfully absorb the barrier.
*/
flags = pg_atomic_exchange_u32(&MyProcSignalSlot->pss_barrierCheckMask, 0);
@@ -503,15 +503,15 @@ ProcessProcSignalBarrier(void)
*/
if (flags != 0)
{
- bool success = true;
+ bool success = true;
PG_TRY();
{
/*
* Process each type of barrier. The barrier-processing functions
- * should normally return true, but may return false if the barrier
- * can't be absorbed at the current time. This should be rare,
- * because it's pretty expensive. Every single
+ * should normally return true, but may return false if the
+ * barrier can't be absorbed at the current time. This should be
+ * rare, because it's pretty expensive. Every single
* CHECK_FOR_INTERRUPTS() will return here until we manage to
* absorb the barrier, and that cost will add up in a hurry.
*
@@ -521,8 +521,8 @@ ProcessProcSignalBarrier(void)
*/
while (flags != 0)
{
- ProcSignalBarrierType type;
- bool processed = true;
+ ProcSignalBarrierType type;
+ bool processed = true;
type = (ProcSignalBarrierType) pg_rightmost_one_pos32(flags);
switch (type)
@@ -533,8 +533,8 @@ ProcessProcSignalBarrier(void)
}
/*
- * To avoid an infinite loop, we must always unset the bit
- * in flags.
+ * To avoid an infinite loop, we must always unset the bit in
+ * flags.
*/
BARRIER_CLEAR_BIT(flags, type);