/bionic/libc/kernel/arch-x86/asm/ |
H A D | unaligned.h | 21 #define get_unaligned(ptr) (*(ptr)) 22 #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
|
H A D | cmpxchg_32.h | 22 #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) 29 #define set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit_constant(ptr, value) : __set_64bit_var(ptr, value) ) 30 #define _set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : __set_64bit(ptr, ll_lo [all...] |
H A D | uaccess_32.h | 47 #define __get_user_x(size,ret,x,ptr) __asm__ __volatile__("call __get_user_" #size :"=a" (ret),"=d" (x) :"0" (ptr)) 49 #define get_user(x,ptr) ({ int __ret_gu; unsigned long __val_gu; __chk_user_ptr(ptr); switch(sizeof (*(ptr))) { case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; } (x) = (__typeof__(*(ptr)))__val_g [all...] |
/bionic/libc/arch-arm/bionic/ |
H A D | atomics_arm.c | 61 __atomic_cmpxchg(int old, int _new, volatile int *ptr) argument 64 return __sync_val_compare_and_swap(ptr, old, _new) != old; 68 __atomic_swap(int _new, volatile int *ptr) argument 72 prev = *ptr; 73 } while (__sync_val_compare_and_swap(ptr, prev, _new) != prev); 78 __atomic_dec(volatile int *ptr) argument 80 return __sync_fetch_and_sub (ptr, 1); 84 __atomic_inc(volatile int *ptr) argument 86 return __sync_fetch_and_add (ptr, 1);
|
/bionic/libc/arch-mips/bionic/ |
H A D | __set_tls.c | 32 int __set_tls(void *ptr) argument 34 return __set_thread_area(ptr);
|
/bionic/libc/kernel/arch-arm/asm/ |
H A D | locks.h | 22 #define __down_op(ptr,fail) ({ __asm__ __volatile__( "@ down_op\n" "1: ldrex lr, [%0]\n" " sub lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %0\n" " blmi " #fail : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); }) 24 #define __down_op_ret(ptr,fail) ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" "1: ldrex lr, [%1]\n" " sub lr, lr, %2\n" " strex ip, lr, [%1]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " #fail "\n" " mov %0, ip" : "=&r" (ret) : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); ret; }) 25 #define __up_op(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op\n" "1: ldrex lr, [%0]\n" " add lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " cmp lr, #0\n" " movle ip, %0\n" " blle " #wake : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); }) 29 #define __down_op_write(ptr,fail) ({ __asm__ __volatile__( "@ down_op_write\n" "1: ldrex lr, [%0]\n" " sub lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movne ip, %0\n" " blne " #fail : : "r" (ptr), "I" (RW_LOCK_BIAS) : "ip", "lr", "cc"); smp_mb(); }) 30 #define __up_op_write(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op_write\n" "1: ldrex lr, [%0]\n" " adds lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " movcs ip, %0\n" " blcs " #wake : : "r" (ptr), " [all...] |
H A D | unaligned.h | 27 #define __get_unaligned_le(ptr) ({ __typeof__(*(ptr)) __v; __u8 *__p = (__u8 *)(ptr); switch (sizeof(*(ptr))) { case 1: __v = *(ptr); break; case 2: __v = __get_unaligned_2_le(__p); break; case 4: __v = __get_unaligned_4_le(__p); break; case 8: { unsigned int __v1, __v2; __v2 = __get_unaligned_4_le((__p+4)); __v1 = __get_unaligned_4_le(__p); __v = ((unsigned long long)__v2 << 32 | __v1); } break; default: __v = __bug_unaligned_x(__p); break; } __v; }) 29 #define __get_unaligned_be(ptr) ({ __typeof__(*(ptr)) __v; __u8 *__p = (__u8 *)(ptr); switch (sizeof(*(ptr))) { case 1: __v = *(ptr); brea [all...] |
H A D | uaccess.h | 47 #define __get_user(x,ptr) ({ long __gu_err = 0; __get_user_err((x),(ptr),__gu_err); __gu_err; }) 49 #define __get_user_error(x,ptr,err) ({ __get_user_err((x),(ptr),err); (void) 0; }) 50 #define __get_user_err(x,ptr,err) do { unsigned long __gu_addr = (unsigned long)(ptr); unsigned long __gu_val; __chk_user_ptr(ptr); switch (sizeof(*(ptr))) { case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; default: (__gu_val) = __get_user_bad(); } (x) = (__typeof__(*(ptr)))__gu_val; } while (0) 60 #define __put_user(x,ptr) ({ lon [all...] |
/bionic/libc/include/sys/ |
H A D | atomics.h | 50 __atomic_cmpxchg(int old_value, int new_value, volatile int* ptr) argument 53 return __sync_val_compare_and_swap(ptr, old_value, new_value) != old_value; 57 __atomic_swap(int new_value, volatile int *ptr) argument 61 old_value = *ptr; 62 } while (__sync_val_compare_and_swap(ptr, old_value, new_value) != old_value); 67 __atomic_dec(volatile int *ptr) argument 69 return __sync_fetch_and_sub (ptr, 1); 73 __atomic_inc(volatile int *ptr) argument 75 return __sync_fetch_and_add (ptr, 1);
|
/bionic/libc/private/ |
H A D | bionic_atomic_gcc_builtin.h | 31 __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 34 return __sync_val_compare_and_swap(ptr, old_value, new_value) != old_value; 38 __bionic_swap(int32_t new_value, volatile int32_t* ptr) argument 42 old_value = *ptr; 43 } while (__sync_val_compare_and_swap(ptr, old_value, new_value) != old_value); 48 __bionic_atomic_inc(volatile int32_t* ptr) argument 51 return __sync_fetch_and_add(ptr, 1); 55 __bionic_atomic_dec(volatile int32_t* ptr) argument 58 return __sync_fetch_and_add(ptr, -1);
|
H A D | bionic_atomic_mips.h | 42 __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 46 " ll %[prev], 0(%[ptr]) \n" 48 " sc %[status], 0(%[ptr]) \n" 51 : [prev]"=&r"(prev), [status]"=&r"(status), "+m"(*ptr) 52 : [new_value]"r"(new_value), [old_value]"r"(old_value), [ptr]"r"(ptr) 60 __bionic_swap(int32_t new_value, volatile int32_t *ptr) argument 64 " ll %[prev], 0(%[ptr]) \n" 65 " sc %[status], 0(%[ptr]) \n" 67 : [prev]"=&r"(prev), [status]"=&r"(status), "+m"(*ptr) 75 __bionic_atomic_inc(volatile int32_t *ptr) argument 90 __bionic_atomic_dec(volatile int32_t *ptr) argument [all...] |
H A D | bionic_atomic_x86.h | 42 __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 47 : "q" (new_value), "m" (*ptr), "0" (old_value) 55 __bionic_swap(int32_t new_value, volatile int32_t *ptr) argument 59 : "m" (*ptr), "0" (new_value) 66 __bionic_atomic_inc(volatile int32_t *ptr) argument 70 : "+r" (increment), "+m" (*ptr) 72 /* increment now holds the old value of *ptr */ 78 __bionic_atomic_dec(volatile int32_t *ptr) argument 82 : "+r" (increment), "+m" (*ptr) 84 /* increment now holds the old value of *ptr */ [all...] |
H A D | bionic_atomic_arm.h | 140 __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 154 : "=&r" (prev), "=&r" (status), "+m"(*ptr) 155 : "r" (ptr), "Ir" (old_value), "r" (new_value) 166 __kernel_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 169 return (*(kernel_cmpxchg *)0xffff0fc0)(old_value, new_value, ptr); 173 __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) argument 175 return __kernel_cmpxchg(old_value, new_value, ptr); 187 __bionic_swap(int32_t new_value, volatile int32_t* ptr) argument 196 : "=&r" (prev), "=&r" (status), "+m" (*ptr) 197 : "r" (ptr), " 204 __bionic_swap(int32_t new_value, volatile int32_t* ptr) argument 221 __bionic_atomic_inc(volatile int32_t* ptr) argument 239 __bionic_atomic_inc(volatile int32_t* ptr) argument 255 __bionic_atomic_dec(volatile int32_t* ptr) argument 273 __bionic_atomic_dec(volatile int32_t* ptr) argument [all...] |
/bionic/libstdc++/src/ |
H A D | new.cpp | 24 void operator delete(void* ptr) argument 26 free(ptr); 29 void operator delete[](void* ptr) argument 31 free(ptr); 44 void operator delete(void* ptr, const std::nothrow_t&) argument 46 free(ptr); 49 void operator delete[](void* ptr, const std::nothrow_t&) argument 51 free(ptr);
|
/bionic/libc/kernel/arch-mips/asm/ |
H A D | cmpxchg.h | 25 #define __cmpxchg(ptr, old, new, barrier) ({ __typeof__(ptr) __ptr = (ptr); __typeof__(*(ptr)) __old = (old); __typeof__(*(ptr)) __new = (new); __typeof__(*(ptr)) __res = 0; barrier; switch (sizeof(*(__ptr))) { case 4: __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); break; case 8: if (sizeof(long) == 8) { __res = __cmpxchg_asm("lld", "scd", __ptr, __old, __new); break; } default: __cmpxchg_called_with_bad_pointer(); break; } barrier; __res; }) 26 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_llsc_mb()) 27 #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, ol [all...] |
H A D | uaccess.h | 49 #define put_user(x,ptr) __put_user_check((x), (ptr), sizeof(*(ptr))) 50 #define get_user(x,ptr) __get_user_check((x), (ptr), sizeof(*(ptr))) 51 #define __put_user(x,ptr) __put_user_nocheck((x), (ptr), sizeof(*(ptr))) 52 #define __get_user(x,ptr) __get_user_nochec [all...] |
H A D | system.h | 37 #define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
|
/bionic/libc/kernel/common/linux/ |
H A D | compiler-gcc.h | 20 #define RELOC_HIDE(ptr, off) ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(ptr)); (typeof(ptr)) (__ptr + (off)); })
|
H A D | highmem.h | 35 #define kmap_atomic_to_page(ptr) virt_to_page(ptr)
|
H A D | percpu.h | 34 #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
|
H A D | rbtree.h | 47 #define rb_entry(ptr, type, member) container_of(ptr, type, member)
|
/bionic/libc/arch-x86/bionic/ |
H A D | __set_tls.c | 72 int __set_tls(void *ptr) argument 77 _tls_desc.base_addr = (unsigned long)ptr; 79 /* We also need to write the location of the tls to ptr[0] */ 80 ((struct _thread_area_head *)ptr)->self = ptr;
|
/bionic/libc/bionic/ |
H A D | malloc_debug_qemu.cpp | 88 void* ptr; member in struct:MallocDesc 95 * stored in in the ptr field of this structure. 140 void* ptr; member in struct:MallocDescQuery 175 void* ptr; member in struct:MallocFree 372 return static_cast<char*>(desc->ptr) + desc->prefix_size; 393 return static_cast<char*>(desc->ptr) + mallocdesc_alloc_size(desc); 448 * ptr - Pointer to the memory block that's being freed. 455 free_desc.ptr = ptr_to_free; 467 * ptr - Pointer to request allocation information for. 476 static inline int query_qemu_malloc_info(void* ptr, MallocDes argument [all...] |
H A D | dlmalloc.c | 36 static void __bionic_itox(char* hex, void* ptr) argument 38 intptr_t val = (intptr_t) ptr;
|
/bionic/libc/kernel/common/linux/netfilter_ipv4/ |
H A D | ipt_hashlimit.h | 46 void *ptr; member in union:ipt_hashlimit_info::__anon417
|