diff options
Diffstat (limited to 'libgcc/config/pa/linux-atomic.c')
-rw-r--r-- | libgcc/config/pa/linux-atomic.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libgcc/config/pa/linux-atomic.c b/libgcc/config/pa/linux-atomic.c index 14e09c4..09436dd 100644 --- a/libgcc/config/pa/linux-atomic.c +++ b/libgcc/config/pa/linux-atomic.c @@ -1,5 +1,5 @@ /* Linux-specific atomic operations for PA Linux. - Copyright (C) 2008-2024 Free Software Foundation, Inc. + Copyright (C) 2008-2025 Free Software Foundation, Inc. Based on code contributed by CodeSourcery for ARM EABI Linux. Modifications for PA Linux by Helge Deller <deller@gmx.de> @@ -24,9 +24,9 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -#define EFAULT 14 +#define EFAULT 14 #define EBUSY 16 -#define ENOSYS 251 +#define ENOSYS 251 #define _ASM_EFAULT "-14" @@ -264,8 +264,6 @@ OP_AND_FETCH_WORD (and, , &) OP_AND_FETCH_WORD (xor, , ^) OP_AND_FETCH_WORD (nand, ~, &) -typedef unsigned char bool; - #define COMPARE_AND_SWAP_2(TYPE, WIDTH, INDEX) \ TYPE HIDDEN \ __sync_val_compare_and_swap_##WIDTH (volatile void *ptr, TYPE oldval, \ @@ -306,7 +304,7 @@ __sync_val_compare_and_swap_4 (volatile void *ptr, unsigned int oldval, { long fail; unsigned int actual_oldval; - + while (1) { actual_oldval = atomic_load_4 ((volatile unsigned int *)ptr); @@ -315,7 +313,7 @@ __sync_val_compare_and_swap_4 (volatile void *ptr, unsigned int oldval, return actual_oldval; fail = __kernel_cmpxchg (ptr, actual_oldval, newval); - + if (__builtin_expect (!fail, 1)) return actual_oldval; } |