/netbsd-current/external/gpl3/gcc.old/dist/libgomp/config/linux/ |
H A D | mutex.c | 36 gomp_mutex_lock_slow (gomp_mutex_t *mutex, int oldval) argument 39 while (oldval == 1) 44 oldval = __atomic_exchange_n (mutex, -1, MEMMODEL_ACQUIRE); 45 if (oldval == 0) 53 oldval = 0; 54 if (__atomic_compare_exchange_n (mutex, &oldval, 1, false, 62 while ((oldval = __atomic_exchange_n (mutex, -1, MEMMODEL_ACQUIRE)))
|
H A D | mutex.h | 54 int oldval = 0; local 55 if (!__atomic_compare_exchange_n (mutex, &oldval, 1, false, 57 gomp_mutex_lock_slow (mutex, oldval);
|
H A D | ptrlock.h | 50 uintptr_t oldval; local 56 oldval = 0; 57 if (__atomic_compare_exchange_n (ptrlock, &oldval, 1, false,
|
/netbsd-current/external/gpl3/gcc/dist/libgomp/config/linux/ |
H A D | mutex.c | 36 gomp_mutex_lock_slow (gomp_mutex_t *mutex, int oldval) argument 39 while (oldval == 1) 44 oldval = __atomic_exchange_n (mutex, -1, MEMMODEL_ACQUIRE); 45 if (oldval == 0) 53 oldval = 0; 54 if (__atomic_compare_exchange_n (mutex, &oldval, 1, false, 62 while ((oldval = __atomic_exchange_n (mutex, -1, MEMMODEL_ACQUIRE)))
|
H A D | mutex.h | 54 int oldval = 0; local 55 if (!__atomic_compare_exchange_n (mutex, &oldval, 1, false, 57 gomp_mutex_lock_slow (mutex, oldval);
|
/netbsd-current/external/gpl3/gcc/dist/libgomp/config/nvptx/ |
H A D | atomic.c | 10 __sync_val_compare_and_swap_16 (volatile void *vptr, unsigned __int128 oldval, argument 14 __int128 expected = oldval;
|
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/m68k/ |
H A D | linux-atomic.c | 44 __kernel_cmpxchg (unsigned *mem, unsigned oldval, unsigned newval) argument 47 register unsigned d2 asm("d2") = oldval; 75 unsigned oldval, newval, cmpval = *ptr; \ 78 oldval = cmpval; \ 79 newval = PFX_OP (oldval INF_OP val); \ 80 cmpval = __kernel_cmpxchg (ptr, oldval, newval); \ 81 } while (__builtin_expect (oldval != cmpval, 0)); \ 91 unsigned int mask, shift, oldval, newval, cmpval, wval; \ 99 oldval = cmpval; \ 100 newval = PFX_OP (oldval INF_O 151 __sync_val_compare_and_swap_4(unsigned *ptr, unsigned oldval, unsigned newval) argument 157 __sync_bool_compare_and_swap_4(unsigned *ptr, unsigned oldval, unsigned newval) argument [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/m68k/ |
H A D | linux-atomic.c | 44 __kernel_cmpxchg (unsigned *mem, unsigned oldval, unsigned newval) argument 47 register unsigned d2 asm("d2") = oldval; 75 unsigned oldval, newval, cmpval = *ptr; \ 78 oldval = cmpval; \ 79 newval = PFX_OP (oldval INF_OP val); \ 80 cmpval = __kernel_cmpxchg (ptr, oldval, newval); \ 81 } while (__builtin_expect (oldval != cmpval, 0)); \ 91 unsigned int mask, shift, oldval, newval, cmpval, wval; \ 99 oldval = cmpval; \ 100 newval = PFX_OP (oldval INF_O 151 __sync_val_compare_and_swap_4(unsigned *ptr, unsigned oldval, unsigned newval) argument 157 __sync_bool_compare_and_swap_4(unsigned *ptr, unsigned oldval, unsigned newval) argument [all...] |
/netbsd-current/common/lib/libc/atomic/ |
H A D | atomic_cas_16_cas.c | 43 bool_compare_and_swap_2(volatile uint16_t *addr, uint16_t oldval, argument 46 return atomic_cas_16(addr, oldval, newval) == oldval;
|
H A D | atomic_cas_32_cas.c | 41 bool_compare_and_swap_4(volatile uint32_t *addr, uint32_t oldval, argument 44 return atomic_cas_32(addr, oldval, newval) == oldval;
|
H A D | atomic_cas_64_cas.c | 43 bool_compare_and_swap_8(volatile uint64_t *addr, uint64_t oldval, argument 46 return atomic_cas_64(addr, oldval, newval) == oldval;
|
H A D | atomic_cas_8_cas.c | 43 bool_compare_and_swap_1(volatile uint8_t *addr, uint8_t oldval, argument 46 return atomic_cas_8(addr, oldval, newval) == oldval;
|
/netbsd-current/external/mit/libuv/dist/src/unix/ |
H A D | atomic-ops.h | 25 UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)); 31 UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)) { argument 36 : "r" (newval), "0" (oldval) 43 __asm(" cs %0,%2,%1 \n " : "+r"(oldval), "+m"(*ptr) : "r"(newval) :); 44 return oldval; 46 return atomic_cas_uint((uint_t *)ptr, (uint_t)oldval, (uint_t)newval); 48 return __sync_val_compare_and_swap(ptr, oldval, newval);
|
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/arm/ |
H A D | linux-atomic.c | 27 typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); 56 static int __fdpic_cmpxchg (int oldval, int newval, int *ptr) argument 66 : "r" (oldval) , "r" (newval), "r" (ptr) 134 unsigned int mask, shift, oldval, newval; \ 141 oldval = *wordptr; \ 142 newval = ((PFX_OP (((oldval & mask) >> shift) \ 144 newval |= oldval & ~mask; \ 145 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 151 SUBWORD_SYNC_OP (add, , +, short, 2, oldval) 152 SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) 201 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 255 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 283 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/arm/ |
H A D | linux-atomic.c | 27 typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); 56 static int __fdpic_cmpxchg (int oldval, int newval, int *ptr) argument 66 : "r" (oldval) , "r" (newval), "r" (ptr) 134 unsigned int mask, shift, oldval, newval; \ 141 oldval = *wordptr; \ 142 newval = ((PFX_OP (((oldval & mask) >> shift) \ 144 newval |= oldval & ~mask; \ 145 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 151 SUBWORD_SYNC_OP (add, , +, short, 2, oldval) 152 SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) 201 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 255 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 283 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/csky/ |
H A D | linux-atomic.c | 28 __kernel_cmpxchg (int oldval, int newval, volatile int *ptr) argument 30 register int _a0 asm ("a0") = oldval; 97 unsigned int mask, shift, oldval, newval; \ 105 oldval = *wordptr; \ 106 newval = ((PFX_OP (((oldval & mask) >> shift) \ 108 newval |= oldval & ~mask; \ 109 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 116 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 117 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 118 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 168 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 221 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 249 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/nds32/ |
H A D | linux-atomic.c | 29 __kernel_cmpxchg (int oldval, int newval, int *mem) argument 43 : "r" (mem), "r" (newval), "r" (oldval) : "memory"); 93 unsigned int mask, shift, oldval, newval; \ 100 oldval = __atomic_load_n (wordptr, __ATOMIC_SEQ_CST); \ 101 newval = ((PFX_OP (((oldval & mask) >> shift) \ 103 newval |= oldval & ~mask; \ 104 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 111 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 112 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 113 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 161 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 214 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 236 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/nios2/ |
H A D | linux-atomic.c | 32 __kernel_cmpxchg (int oldval, int newval, int *mem) argument 36 register int r5 asm ("r5") = oldval; 93 unsigned int mask, shift, oldval, newval; \ 100 oldval = *wordptr; \ 101 newval = ((PFX_OP (((oldval & mask) >> shift) \ 103 newval |= oldval & ~mask; \ 104 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 110 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 111 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 112 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 160 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 213 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 235 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/nds32/ |
H A D | linux-atomic.c | 29 __kernel_cmpxchg (int oldval, int newval, int *mem) argument 43 : "r" (mem), "r" (newval), "r" (oldval) : "memory"); 93 unsigned int mask, shift, oldval, newval; \ 100 oldval = __atomic_load_n (wordptr, __ATOMIC_SEQ_CST); \ 101 newval = ((PFX_OP (((oldval & mask) >> shift) \ 103 newval |= oldval & ~mask; \ 104 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 111 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 112 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 113 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 161 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 214 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 236 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/csky/ |
H A D | linux-atomic.c | 28 __kernel_cmpxchg (int oldval, int newval, volatile int *ptr) argument 30 register int _a0 asm ("a0") = oldval; 97 unsigned int mask, shift, oldval, newval; \ 105 oldval = *wordptr; \ 106 newval = ((PFX_OP (((oldval & mask) >> shift) \ 108 newval |= oldval & ~mask; \ 109 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 116 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 117 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 118 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 168 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 221 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 249 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/nios2/ |
H A D | linux-atomic.c | 32 __kernel_cmpxchg (int oldval, int newval, int *mem) argument 36 register int r5 asm ("r5") = oldval; 93 unsigned int mask, shift, oldval, newval; \ 100 oldval = *wordptr; \ 101 newval = ((PFX_OP (((oldval & mask) >> shift) \ 103 newval |= oldval & ~mask; \ 104 failure = __kernel_cmpxchg (oldval, newval, wordptr); \ 110 SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) 111 SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) 112 SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) 160 __sync_val_compare_and_swap_4(int *ptr, int oldval, int newval) argument 213 __sync_bool_compare_and_swap_4(int *ptr, int oldval, int newval) argument 235 int failure, oldval; local [all...] |
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/gcn/ |
H A D | atomic.c | 29 __sync_val_compare_and_swap_##SIZE (TYPE *ptr, TYPE oldval, TYPE newval) \ 39 if (__builtin_expect (prevval != oldval, 0)) \ 46 return oldval; \ 52 __sync_bool_compare_and_swap_##SIZE (TYPE *ptr, TYPE oldval, TYPE newval) \ 54 return __sync_val_compare_and_swap_##SIZE (ptr, oldval, newval) == oldval; \
|
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/nvptx/ |
H A D | atomic.c | 39 __sync_val_compare_and_swap_##SIZE (volatile void *vptr, TYPE oldval, \ 54 if (__builtin_expect (prevval != oldval, 0)) \ 64 return oldval; \ 70 __sync_bool_compare_and_swap_##SIZE (volatile void *ptr, TYPE oldval, \ 73 return __sync_val_compare_and_swap_##SIZE (ptr, oldval, newval) == oldval; \
|
/netbsd-current/external/gpl3/gcc.old/dist/libgcc/config/tilepro/ |
H A D | atomic.c | 167 type oldval = *oldvalp; \ 169 type retval = arch_atomic_val_compare_and_exchange(ptr, oldval, newval); \ 171 bool success = (retval == oldval); \ 190 __sync_val_compare_and_swap_##size(type* ptr, type oldval, type newval) \ 193 type retval = arch_atomic_val_compare_and_exchange(ptr, oldval, newval); \ 199 __sync_bool_compare_and_swap_##size(type* ptr, type oldval, type newval) \ 202 bool retval = arch_atomic_bool_compare_and_exchange(ptr, oldval, newval); \ 237 type oldval = (oldword >> shift) & valmask; \ 238 if (__builtin_expect((oldval == guess), 1)) { \ 241 oldval [all...] |
/netbsd-current/external/gpl3/gcc/dist/libgcc/config/tilepro/ |
H A D | atomic.c | 167 type oldval = *oldvalp; \ 169 type retval = arch_atomic_val_compare_and_exchange(ptr, oldval, newval); \ 171 bool success = (retval == oldval); \ 190 __sync_val_compare_and_swap_##size(type* ptr, type oldval, type newval) \ 193 type retval = arch_atomic_val_compare_and_exchange(ptr, oldval, newval); \ 199 __sync_bool_compare_and_swap_##size(type* ptr, type oldval, type newval) \ 202 bool retval = arch_atomic_bool_compare_and_exchange(ptr, oldval, newval); \ 237 type oldval = (oldword >> shift) & valmask; \ 238 if (__builtin_expect((oldval == guess), 1)) { \ 241 oldval [all...] |