aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/condition_variable.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2017-05-17 16:31:56 -0400
committerBruce Momjian <bruce@momjian.us>2017-05-17 16:31:56 -0400
commita6fd7b7a5f7bf3a8aa3f3d076cf09d922c1c6dd2 (patch)
treed10454411c05d459abe06df161ab3c1156c5f477 /src/backend/storage/lmgr/condition_variable.c
parent8a943324780259757c77c56cfc597347d1150cdb (diff)
downloadpostgresql-a6fd7b7a5f7bf3a8aa3f3d076cf09d922c1c6dd2.tar.gz
postgresql-a6fd7b7a5f7bf3a8aa3f3d076cf09d922c1c6dd2.zip
Post-PG 10 beta1 pgindent run
perltidy run not included.
Diffstat (limited to 'src/backend/storage/lmgr/condition_variable.c')
-rw-r--r--src/backend/storage/lmgr/condition_variable.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/storage/lmgr/condition_variable.c b/src/backend/storage/lmgr/condition_variable.c
index 6f1ef0b7e55..5afb21121b6 100644
--- a/src/backend/storage/lmgr/condition_variable.c
+++ b/src/backend/storage/lmgr/condition_variable.c
@@ -52,7 +52,7 @@ ConditionVariableInit(ConditionVariable *cv)
void
ConditionVariablePrepareToSleep(ConditionVariable *cv)
{
- int pgprocno = MyProc->pgprocno;
+ int pgprocno = MyProc->pgprocno;
/*
* It's not legal to prepare a sleep until the previous sleep has been
@@ -89,10 +89,10 @@ ConditionVariablePrepareToSleep(ConditionVariable *cv)
* called in a predicate loop that tests for a specific exit condition and
* otherwise sleeps, like so:
*
- * ConditionVariablePrepareToSleep(cv); [optional]
- * while (condition for which we are waiting is not true)
- * ConditionVariableSleep(cv, wait_event_info);
- * ConditionVariableCancelSleep();
+ * ConditionVariablePrepareToSleep(cv); [optional]
+ * while (condition for which we are waiting is not true)
+ * ConditionVariableSleep(cv, wait_event_info);
+ * ConditionVariableCancelSleep();
*
* Supply a value from one of the WaitEventXXX enums defined in pgstat.h to
* control the contents of pg_stat_activity's wait_event_type and wait_event
@@ -101,8 +101,8 @@ ConditionVariablePrepareToSleep(ConditionVariable *cv)
void
ConditionVariableSleep(ConditionVariable *cv, uint32 wait_event_info)
{
- WaitEvent event;
- bool done = false;
+ WaitEvent event;
+ bool done = false;
/*
* If the caller didn't prepare to sleep explicitly, then do so now and
@@ -186,7 +186,7 @@ ConditionVariableCancelSleep(void)
bool
ConditionVariableSignal(ConditionVariable *cv)
{
- PGPROC *proc = NULL;
+ PGPROC *proc = NULL;
/* Remove the first process from the wakeup queue (if any). */
SpinLockAcquire(&cv->mutex);
@@ -213,13 +213,13 @@ ConditionVariableSignal(ConditionVariable *cv)
int
ConditionVariableBroadcast(ConditionVariable *cv)
{
- int nwoken = 0;
+ int nwoken = 0;
/*
* Let's just do this the dumbest way possible. We could try to dequeue
* all the sleepers at once to save spinlock cycles, but it's a bit hard
- * to get that right in the face of possible sleep cancelations, and
- * we don't want to loop holding the mutex.
+ * to get that right in the face of possible sleep cancelations, and we
+ * don't want to loop holding the mutex.
*/
while (ConditionVariableSignal(cv))
++nwoken;