forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit768f0c3
committed
Remove bogus assertion in pg_atomic_monotonic_advance_u64
This code wanted to ensure that the 'exchange' variable passed topg_atomic_compare_exchange_u64 has correct alignment, but apparentlyplatforms don't actually require anything that doesn't come naturally.While messing with pg_atomic_monotonic_advance_u64: instead of usingMax() to determine the value to return, just usepg_atomic_compare_exchange_u64()'s return value to decide; also, usepg_atomic_compare_exchange_u64 instead of the _impl version; also removethe unnecessary underscore at the end of variable name "target".Backpatch to 17, where this code was introduced by commit bf3ff7bf83bc.Reported-by: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/36796438-a718-cf9b-2071-b2c1b947c1b5@gmail.com1 parentab0ae64 commit768f0c3
File tree
5 files changed
+14
-11
lines changed- src/include/port
- atomics
5 files changed
+14
-11
lines changedLines changed: 6 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
507 | 507 |
| |
508 | 508 |
| |
509 | 509 |
| |
510 |
| - | |
511 | 510 |
| |
512 | 511 |
| |
513 | 512 |
| |
| |||
576 | 575 |
| |
577 | 576 |
| |
578 | 577 |
| |
579 |
| - | |
| 578 | + | |
580 | 579 |
| |
581 | 580 |
| |
582 | 581 |
| |
| |||
585 | 584 |
| |
586 | 585 |
| |
587 | 586 |
| |
588 |
| - | |
| 587 | + | |
589 | 588 |
| |
590 | 589 |
| |
591 | 590 |
| |
592 | 591 |
| |
593 | 592 |
| |
594 |
| - | |
595 |
| - | |
596 |
| - | |
597 |
| - | |
598 |
| - | |
| 593 | + | |
599 | 594 |
| |
600 |
| - | |
601 |
| - | |
| 595 | + | |
| 596 | + | |
602 | 597 |
| |
603 | 598 |
| |
604 |
| - | |
| 599 | + | |
605 | 600 |
| |
606 | 601 |
| |
607 | 602 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
| 176 | + | |
| 177 | + | |
176 | 178 |
| |
177 | 179 |
| |
178 | 180 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
| 210 | + | |
| 211 | + | |
210 | 212 |
| |
211 | 213 |
| |
212 | 214 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
240 | 240 |
| |
241 | 241 |
| |
242 | 242 |
| |
| 243 | + | |
243 | 244 |
| |
244 | 245 |
| |
245 | 246 |
| |
| |||
253 | 254 |
| |
254 | 255 |
| |
255 | 256 |
| |
| 257 | + | |
| 258 | + | |
256 | 259 |
| |
257 | 260 |
| |
258 | 261 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| 105 | + | |
105 | 106 |
| |
106 | 107 |
| |
107 | 108 |
| |
|
0 commit comments
Comments
(0)