mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
Add unlikely() to CHECK_FOR_INTERRUPTS()
Add the unlikely() branch hint macro to CHECK_FOR_INTERRUPTS(). Backpatch to REL_10_STABLE where we first started using unlikely(). Discussion: https://www.postgresql.org/message-id/flat/8692553c-7fe8-17d9-cbc1-7cddb758f4c6%40joeconway.com
This commit is contained in:
parent
6490376e56
commit
3cbf4be3e0
@ -97,16 +97,16 @@ extern void ProcessInterrupts(void);
|
|||||||
|
|
||||||
#define CHECK_FOR_INTERRUPTS() \
|
#define CHECK_FOR_INTERRUPTS() \
|
||||||
do { \
|
do { \
|
||||||
if (InterruptPending) \
|
if (unlikely(InterruptPending)) \
|
||||||
ProcessInterrupts(); \
|
ProcessInterrupts(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#else /* WIN32 */
|
#else /* WIN32 */
|
||||||
|
|
||||||
#define CHECK_FOR_INTERRUPTS() \
|
#define CHECK_FOR_INTERRUPTS() \
|
||||||
do { \
|
do { \
|
||||||
if (UNBLOCKED_SIGNAL_QUEUE()) \
|
if (unlikely(UNBLOCKED_SIGNAL_QUEUE())) \
|
||||||
pgwin32_dispatch_queued_signals(); \
|
pgwin32_dispatch_queued_signals(); \
|
||||||
if (InterruptPending) \
|
if (unlikely(InterruptPending)) \
|
||||||
ProcessInterrupts(); \
|
ProcessInterrupts(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user