Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87fb04a

Browse files
committed
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
1 parent044c99b commit87fb04a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/include/miscadmin.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ extern void ProcessInterrupts(void);
9898

9999
#defineCHECK_FOR_INTERRUPTS() \
100100
do { \
101-
if (InterruptPending) \
101+
if (unlikely(InterruptPending)) \
102102
ProcessInterrupts(); \
103103
} while(0)
104104
#else/* WIN32 */
105105

106106
#defineCHECK_FOR_INTERRUPTS() \
107107
do { \
108-
if (UNBLOCKED_SIGNAL_QUEUE()) \
108+
if (unlikely(UNBLOCKED_SIGNAL_QUEUE())) \
109109
pgwin32_dispatch_queued_signals(); \
110-
if (InterruptPending) \
110+
if (unlikely(InterruptPending)) \
111111
ProcessInterrupts(); \
112112
} while(0)
113113
#endif/* WIN32 */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp