PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ConditionVariable |
union | ConditionVariableMinimallyPadded |
Macros | |
#define | CV_MINIMAL_SIZE (sizeof(ConditionVariable) <= 16 ? 16 : 32) |
Typedefs | |
typedef union ConditionVariableMinimallyPadded | ConditionVariableMinimallyPadded |
Functions | |
void | ConditionVariableInit (ConditionVariable *cv) |
void | ConditionVariableSleep (ConditionVariable *cv, uint32 wait_event_info) |
bool | ConditionVariableTimedSleep (ConditionVariable *cv, long timeout, uint32 wait_event_info) |
bool | ConditionVariableCancelSleep (void) |
void | ConditionVariablePrepareToSleep (ConditionVariable *cv) |
void | ConditionVariableSignal (ConditionVariable *cv) |
void | ConditionVariableBroadcast (ConditionVariable *cv) |
#define CV_MINIMAL_SIZE (sizeof(ConditionVariable) <= 16 ? 16 : 32) |
Definition at line 38 of file condition_variable.h.
void ConditionVariableBroadcast | ( | ConditionVariable * | cv | ) |
Definition at line 282 of file condition_variable.c.
References Assert, ConditionVariableCancelSleep(), cv_sleep_target, ConditionVariable::mutex, MyProc, MyProcNumber, PGPROC::procLatch, proclist_contains, proclist_is_empty(), proclist_pop_head_node, proclist_push_tail, SetLatch(), SpinLockAcquire, SpinLockRelease, and ConditionVariable::wakeup.
Referenced by _bt_parallel_done(), BarrierArriveAndWait(), BarrierDetachImpl(), BitmapDoneInitializingSharedState(), CheckpointerMain(), CleanupProcSignalState(), injection_points_wakeup(), PhysicalWakeupLogicalWalSnd(), ProcessProcSignalBarrier(), RecordNewMultiXact(), ReplicationOriginExitCleanup(), ReplicationSlotAcquire(), ReplicationSlotCleanup(), ReplicationSlotCreate(), ReplicationSlotDropPtr(), ReplicationSlotRelease(), replorigin_session_reset(), replorigin_session_setup(), SetRecoveryPause(), ShutdownWalRcv(), TerminateBufferIO(), WalRcvDie(), WalRcvRunning(), WalRcvStreaming(), WalReceiverMain(), WalSndWakeup(), and WalSummarizerMain().
bool ConditionVariableCancelSleep | ( | void | ) |
Definition at line 230 of file condition_variable.c.
References cv_sleep_target, ConditionVariable::mutex, MyProcNumber, proclist_contains, proclist_delete, SpinLockAcquire, SpinLockRelease, and ConditionVariable::wakeup.
Referenced by _brin_parallel_heapscan(), _bt_parallel_heapscan(), _bt_parallel_seize(), AbortSubTransaction(), AbortTransaction(), AuxiliaryProcKill(), BackgroundWriterMain(), BarrierArriveAndWait(), BitmapShouldInitializeSharedState(), CheckpointerMain(), ConditionVariableBroadcast(), ConditionVariablePrepareToSleep(), GetMultiXactIdMembers(), injection_wait(), pgarch_archiveXlog(), ProcKill(), recoveryPausesHere(), RecoveryRequiresIntParameter(), ReplicationSlotAcquire(), replorigin_state_clear(), RequestCheckpoint(), ShutdownAuxiliaryProcess(), ShutdownWalRcv(), WaitForProcSignalBarrier(), WaitForStandbyConfirmation(), WaitForWalSummarization(), WaitIO(), WalSndErrorCleanup(), WalSndWait(), WalSummarizerMain(), and WalWriterMain().
void ConditionVariableInit | ( | ConditionVariable * | cv | ) |
Definition at line 35 of file condition_variable.c.
References ConditionVariable::mutex, proclist_init(), SpinLockInit, and ConditionVariable::wakeup.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), BarrierInit(), btinitparallelscan(), BufferManagerShmemInit(), CheckpointerShmemInit(), ExecBitmapHeapInitializeDSM(), injection_point_init_state(), MultiXactShmemInit(), ProcSignalShmemInit(), ReplicationOriginShmemInit(), ReplicationSlotsShmemInit(), WalRcvShmemInit(), WalSndShmemInit(), WalSummarizerShmemInit(), and XLogRecoveryShmemInit().
void ConditionVariablePrepareToSleep | ( | ConditionVariable * | cv | ) |
Definition at line 56 of file condition_variable.c.
References ConditionVariableCancelSleep(), cv_sleep_target, ConditionVariable::mutex, MyProcNumber, proclist_push_tail, SpinLockAcquire, SpinLockRelease, and ConditionVariable::wakeup.
Referenced by BarrierArriveAndWait(), ConditionVariableTimedSleep(), injection_wait(), InvalidatePossiblyObsoleteSlot(), ReplicationSlotAcquire(), RequestCheckpoint(), ShutdownWalRcv(), WaitForStandbyConfirmation(), WaitIO(), and WalSndWait().
void ConditionVariableSignal | ( | ConditionVariable * | cv | ) |
Definition at line 259 of file condition_variable.c.
References ConditionVariable::mutex, PGPROC::procLatch, proclist_is_empty(), proclist_pop_head_node, SetLatch(), SpinLockAcquire, SpinLockRelease, and ConditionVariable::wakeup.
Referenced by _brin_parallel_scan_and_build(), _bt_parallel_release(), and _bt_parallel_scan_and_sort().
void ConditionVariableSleep | ( | ConditionVariable * | cv, |
uint32 | wait_event_info | ||
) |
Definition at line 96 of file condition_variable.c.
References ConditionVariableTimedSleep().
Referenced by _brin_parallel_heapscan(), _bt_parallel_heapscan(), _bt_parallel_seize(), BarrierArriveAndWait(), BitmapShouldInitializeSharedState(), GetMultiXactIdMembers(), injection_wait(), InvalidatePossiblyObsoleteSlot(), ReplicationSlotAcquire(), replorigin_state_clear(), RequestCheckpoint(), ShutdownWalRcv(), and WaitIO().
bool ConditionVariableTimedSleep | ( | ConditionVariable * | cv, |
long | timeout, | ||
uint32 | wait_event_info | ||
) |
Definition at line 112 of file condition_variable.c.
References Assert, CHECK_FOR_INTERRUPTS, ConditionVariablePrepareToSleep(), cv_sleep_target, INSTR_TIME_GET_MILLISEC, INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, ConditionVariable::mutex, MyLatch, MyProcNumber, proclist_contains, proclist_push_tail, ResetLatch(), SpinLockAcquire, SpinLockRelease, start_time, WaitLatch(), ConditionVariable::wakeup, WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_TIMEOUT.
Referenced by ConditionVariableSleep(), recoveryPausesHere(), RecoveryRequiresIntParameter(), WaitForProcSignalBarrier(), WaitForStandbyConfirmation(), and WaitForWalSummarization().