- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit19cefeb
committed
Allow use of __sync_lock_test_and_set for spinlocks on any machine.
If we have no special-case code in s_lock.h for the current platform,but the compiler has __sync_lock_test_and_set, use that instead offailing. It's unlikely that anybody's __sync_lock_test_and_setwould be so awful as to be worse than our semaphore-based fallback,but if it is, they can (continue to) use --disable-spinlocks.This allows removal of the RISC-V special case installed by commitc32fcac, which generated exactly the same code but only on thatplatform. Usefully, the RISC-V buildfarm animals should now testat least the int variant of this patch.I've manually tested both variants on ARM by dint of removing theARM-specific stanza. We don't want to drop that, because it alreadyhas some special knowledge and is likely to grow more over time.Likewise, this is not meant to preclude installing special casesfor other arches if that proves worthwhile.Per discussion of a request to install the same code for loongarch64.Like the previous patch, we might as well back-patch to supportedbranches.Discussion:https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn1 parentb3326a7 commit19cefeb
1 file changed
+45
-23
lines changedLines changed: 45 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 |
| - | |
348 |
| - | |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 | 344 |
| |
368 | 345 |
| |
369 | 346 |
| |
| |||
748 | 725 |
| |
749 | 726 |
| |
750 | 727 |
| |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
751 | 773 |
| |
752 | 774 |
| |
753 | 775 |
| |
|
0 commit comments
Comments
(0)