aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/shm_mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc/shm_mq.c')
-rw-r--r--src/backend/storage/ipc/shm_mq.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c
index 44ede336162..5b32782022b 100644
--- a/src/backend/storage/ipc/shm_mq.c
+++ b/src/backend/storage/ipc/shm_mq.c
@@ -896,11 +896,11 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, const void *data,
*/
WaitLatch(MyLatch, WL_LATCH_SET, 0);
- /* An interrupt may have occurred while we were waiting. */
- CHECK_FOR_INTERRUPTS();
-
/* Reset the latch so we don't spin. */
ResetLatch(MyLatch);
+
+ /* An interrupt may have occurred while we were waiting. */
+ CHECK_FOR_INTERRUPTS();
}
else
{
@@ -993,11 +993,11 @@ shm_mq_receive_bytes(shm_mq *mq, Size bytes_needed, bool nowait,
*/
WaitLatch(MyLatch, WL_LATCH_SET, 0);
- /* An interrupt may have occurred while we were waiting. */
- CHECK_FOR_INTERRUPTS();
-
/* Reset the latch so we don't spin. */
ResetLatch(MyLatch);
+
+ /* An interrupt may have occurred while we were waiting. */
+ CHECK_FOR_INTERRUPTS();
}
}
@@ -1092,11 +1092,11 @@ shm_mq_wait_internal(volatile shm_mq *mq, PGPROC *volatile * ptr,
/* Wait to be signalled. */
WaitLatch(MyLatch, WL_LATCH_SET, 0);
- /* An interrupt may have occurred while we were waiting. */
- CHECK_FOR_INTERRUPTS();
-
/* Reset the latch so we don't spin. */
ResetLatch(MyLatch);
+
+ /* An interrupt may have occurred while we were waiting. */
+ CHECK_FOR_INTERRUPTS();
}
return result;