forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite47f93f
committed
Refactor CHECK_FOR_INTERRUPTS() to add flexibility.
Split up CHECK_FOR_INTERRUPTS() to provide an additional macroINTERRUPTS_PENDING_CONDITION(), which just tests whether aninterrupt is pending without attempting to service it. This isuseful in situations where the caller knows that interrupts areblocked, and would like to find out if it's worth the troubleto unblock them.Also add INTERRUPTS_CAN_BE_PROCESSED(), which indicates whetherCHECK_FOR_INTERRUPTS() can be relied on to clear the pending interrupt.This commit doesn't actually add any uses of the new macros,but a follow-on bug fix will do so. Back-patch to all supportedbranches to provide infrastructure for that fix.Alvaro Herrera and Tom LaneDiscussion:https://postgr.es/m/20210513155351.GA7848@alvherre.pgsql1 parent1b5617e commite47f93f
2 files changed
+35
-13
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
554 | 554 |
| |
555 | 555 |
| |
556 | 556 |
| |
557 |
| - | |
| 557 | + | |
558 | 558 |
| |
559 | 559 |
| |
560 | 560 |
| |
| |||
3118 | 3118 |
| |
3119 | 3119 |
| |
3120 | 3120 |
| |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
3121 | 3127 |
| |
3122 | 3128 |
| |
3123 | 3129 |
| |
| |||
3248 | 3254 |
| |
3249 | 3255 |
| |
3250 | 3256 |
| |
3251 |
| - | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
3252 | 3262 |
| |
3253 | 3263 |
| |
3254 | 3264 |
| |
|
Lines changed: 23 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
60 | 69 |
| |
61 | 70 |
| |
62 | 71 |
| |
| |||
97 | 106 |
| |
98 | 107 |
| |
99 | 108 |
| |
| 109 | + | |
100 | 110 |
| |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
101 | 118 |
| |
| 119 | + | |
102 | 120 |
| |
103 | 121 |
| |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
| 122 | + | |
114 | 123 |
| |
115 | 124 |
| |
116 |
| - | |
117 | 125 |
| |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
118 | 130 |
| |
119 | 131 |
| |
120 | 132 |
| |
|
0 commit comments
Comments
(0)