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

Commitba16aad

Browse files
committed
Switch flags tracking pending interrupts to sig_atomic_t
Those previously used bool, which should be safe on any modernplatforms, however the C standard is clear that it is better to usesig_atomic_t for variables manipulated in signal handlers. This commitadds at the same time PGDLLIMPORT to ClientConnectionLost.Author: Michael PaquierReviewed-by: Tom Lane, Chris Travers, Andres FreundDiscussion:https://postgr.es/m/20180925011311.GD1354@paquier.xyz
1 parent751f532 commitba16aad

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/backend/utils/init/globals.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727

2828
ProtocolVersionFrontendProtocol;
2929

30-
volatileboolInterruptPending= false;
31-
volatileboolQueryCancelPending= false;
32-
volatileboolProcDiePending= false;
33-
volatileboolClientConnectionLost= false;
34-
volatileboolIdleInTransactionSessionTimeoutPending= false;
30+
volatilesig_atomic_tInterruptPending= false;
31+
volatilesig_atomic_tQueryCancelPending= false;
32+
volatilesig_atomic_tProcDiePending= false;
33+
volatilesig_atomic_tClientConnectionLost= false;
34+
volatilesig_atomic_tIdleInTransactionSessionTimeoutPending= false;
3535
volatilesig_atomic_tConfigReloadPending= false;
3636
volatileuint32InterruptHoldoffCount=0;
3737
volatileuint32QueryCancelHoldoffCount=0;

‎src/include/miscadmin.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@
7777

7878
/* in globals.c */
7979
/* these are marked volatile because they are set by signal handlers: */
80-
externPGDLLIMPORTvolatileboolInterruptPending;
81-
externPGDLLIMPORTvolatileboolQueryCancelPending;
82-
externPGDLLIMPORTvolatileboolProcDiePending;
83-
externPGDLLIMPORTvolatileboolIdleInTransactionSessionTimeoutPending;
80+
externPGDLLIMPORTvolatilesig_atomic_tInterruptPending;
81+
externPGDLLIMPORTvolatilesig_atomic_tQueryCancelPending;
82+
externPGDLLIMPORTvolatilesig_atomic_tProcDiePending;
83+
externPGDLLIMPORTvolatilesig_atomic_tIdleInTransactionSessionTimeoutPending;
8484
externPGDLLIMPORTvolatilesig_atomic_tConfigReloadPending;
8585

86-
externvolatileboolClientConnectionLost;
86+
externPGDLLIMPORTvolatilesig_atomic_tClientConnectionLost;
8787

8888
/* these are marked volatile because they are examined by signal handlers: */
8989
externPGDLLIMPORTvolatileuint32InterruptHoldoffCount;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp