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

Commitc5262cf

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 parent9a9ba4c commitc5262cf

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
@@ -97,16 +97,16 @@ extern void ProcessInterrupts(void);
9797

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

105105
#defineCHECK_FOR_INTERRUPTS() \
106106
do { \
107-
if (UNBLOCKED_SIGNAL_QUEUE()) \
107+
if (unlikely(UNBLOCKED_SIGNAL_QUEUE())) \
108108
pgwin32_dispatch_queued_signals(); \
109-
if (InterruptPending) \
109+
if (unlikely(InterruptPending)) \
110110
ProcessInterrupts(); \
111111
} while(0)
112112
#endif/* WIN32 */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp