/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/tests/ |
H A D | malloc_test.cpp | 29 void *ptr = malloc(100); local 30 ASSERT_TRUE(ptr != NULL); 31 ASSERT_LE(100U, malloc_usable_size(ptr)); 32 free(ptr); 44 char *ptr = (char *)calloc(1, alloc_len); local 45 ASSERT_TRUE(ptr != NULL); 46 ASSERT_LE(alloc_len, malloc_usable_size(ptr)); 48 ASSERT_EQ(0, ptr[i]); 50 free(ptr); 78 char *ptr local 93 void* ptr; local 102 void* ptr; local 107 void* ptr; local 114 char *ptr = (char*)memalign(alignment, 100); local 149 char *ptr = (char *)malloc(100); local 165 char *ptr = (char *)malloc(200); local 181 char *ptr = (char *)malloc(200); local 219 char *ptr = (char *)calloc(1, 100); local 234 char *ptr = (char *)calloc(1, 200); local 249 char *ptr = (char *)calloc(1, 200); local 288 void* ptr = malloc(100); local 302 void* ptr = pvalloc(100); local 315 void* ptr = pvalloc(100); local [all...] |
H A D | stack_unwinding_test_impl.c | 46 char* ptr = NULL; local 47 *ptr = 0; // Deliberately cause a SIGSEGV.
|
H A D | string_test.cpp | 168 ptr = glob_ptr + align1; 174 Character *ptr, *ptr1, *ptr2; member in struct:StringTestState 206 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN); 212 strcpy(state.ptr + state.MAX_LEN - 1, state.ptr1); 215 EXPECT_TRUE(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN) == 0); 461 memcpy(state.ptr, state.ptr1, state.MAX_LEN); 466 memset(state.ptr + state.MAX_LEN, '\1', state.MAX_LEN); 467 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); 468 state.ptr[2 * state.MAX_LEN - 1] = '\0'; 471 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, stat 912 char* ptr = reinterpret_cast<char*>(malloc(sizeof(char) * len)); local [all...] |
/bionic/libc/private/ |
H A D | bionic_atomic_mips.h | 36 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) { argument 39 " ll %[prev], 0(%[ptr]) \n" 41 " sc %[status], 0(%[ptr]) \n" 44 : [prev]"=&r"(prev), [status]"=&r"(status), "+m"(*ptr) 45 : [new_value]"r"(new_value), [old_value]"r"(old_value), [ptr]"r"(ptr) 51 __ATOMIC_INLINE__ int32_t __bionic_swap(int32_t new_value, volatile int32_t* ptr) { argument 54 " ll %[prev], 0(%[ptr]) \n" 55 " sc %[status], 0(%[ptr]) \n" 57 : [prev]"=&r"(prev), [status]"=&r"(status), "+m"(*ptr) 64 __bionic_atomic_dec(volatile int32_t* ptr) argument [all...] |
H A D | bionic_atomic_gcc_builtin.h | 32 __ATOMIC_INLINE__ int __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; 37 __ATOMIC_INLINE__ int32_t __bionic_swap(int32_t new_value, volatile int32_t* ptr) { argument 40 old_value = *ptr; 41 } while (__sync_val_compare_and_swap(ptr, old_value, new_value) != old_value); 45 __ATOMIC_INLINE__ int32_t __bionic_atomic_dec(volatile int32_t* ptr) { argument 47 return __sync_fetch_and_add(ptr, -1);
|
H A D | bionic_atomic_arm.h | 32 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) { argument 43 : "=&r" (prev), "=&r" (status), "+m"(*ptr) 44 : "r" (ptr), "Ir" (old_value), "r" (new_value) 51 __ATOMIC_INLINE__ int32_t __bionic_swap(int32_t new_value, volatile int32_t* ptr) { argument 57 : "=&r" (prev), "=&r" (status), "+m" (*ptr) 58 : "r" (ptr), "r" (new_value) 65 __ATOMIC_INLINE__ int32_t __bionic_atomic_dec(volatile int32_t* ptr) { argument 72 : "=&r" (prev), "=&r" (tmp), "=&r" (status), "+m"(*ptr) 73 : "r" (ptr)
|
H A D | bionic_atomic_arm64.h | 28 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) { argument 38 : "=&r" (tmp), "=&r" (oldval), "+o"(*ptr) 39 : "r" (ptr), "Ir" (old_value), "r" (new_value) 45 __ATOMIC_INLINE__ int32_t __bionic_swap(int32_t new_value, volatile int32_t* ptr) { argument 52 : "=&r" (prev), "=&r" (status), "+o" (*ptr) 53 : "r" (ptr), "r" (new_value) 59 __ATOMIC_INLINE__ int32_t __bionic_atomic_dec(volatile int32_t* ptr) { argument 66 : "=&r" (prev), "=&r" (tmp), "=&r" (status), "+m"(*ptr) 67 : "r" (ptr)
|
H A D | bionic_atomic_x86.h | 35 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) { argument 39 : "q" (new_value), "m" (*ptr), "0" (old_value) 45 __ATOMIC_INLINE__ int32_t __bionic_swap(int32_t new_value, volatile int32_t *ptr) { argument 48 : "m" (*ptr), "0" (new_value) 54 __ATOMIC_INLINE__ int32_t __bionic_atomic_dec(volatile int32_t* ptr) { argument 57 : "+r" (increment), "+m" (*ptr) 59 /* increment now holds the old value of *ptr */
|
/bionic/libc/bionic/ |
H A D | __cmsg_nxthdr.cpp | 32 cmsghdr* ptr; local 33 ptr = reinterpret_cast<cmsghdr*>(reinterpret_cast<char*>(cmsg) + CMSG_ALIGN(cmsg->cmsg_len)); 34 size_t len = reinterpret_cast<char*>(ptr+1) - reinterpret_cast<char*>(msg->msg_control); 38 return ptr;
|
H A D | new.cpp | 41 void operator delete(void* ptr) { argument 42 free(ptr); 45 void operator delete[](void* ptr) { argument 46 free(ptr); 57 void operator delete(void* ptr, const std::nothrow_t&) { argument 58 free(ptr); 61 void operator delete[](void* ptr, const std::nothrow_t&) { argument 62 free(ptr);
|
H A D | malloc_debug_qemu.cpp | 89 void* ptr; member in struct:MallocDesc 96 * stored in in the ptr field of this structure. 141 const void* ptr; member in struct:MallocDescQuery 176 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(const void* ptr, MallocDes argument [all...] |
H A D | malloc_debug_check.cpp | 385 uintptr_t ptr = reinterpret_cast<uintptr_t>(user(reinterpret_cast<hdr_t*>(base))); local 386 if ((ptr % alignment) != 0) { 388 ptr += ((-ptr) % alignment); 391 hdr_t* hdr = meta(reinterpret_cast<void*>(ptr)); 400 extern "C" void chk_free(void* ptr) { argument 403 return g_malloc_dispatch->free(ptr); 406 if (!ptr) /* ignore free(NULL) */ 409 hdr_t* hdr = meta(ptr); 442 extern "C" void* chk_realloc(void* ptr, size_ argument 546 chk_malloc_usable_size(const void* ptr) argument [all...] |
H A D | malloc_debug_leak.cpp | 381 void* ptr = leak_malloc(size); local 382 if (ptr != NULL) { 383 memset(ptr, 0, size); 385 return ptr; 475 uintptr_t ptr = reinterpret_cast<uintptr_t>(base); local 476 if ((ptr % alignment) == 0) { 481 ptr += ((-ptr) % alignment); 486 AllocationEntry* header = to_header(reinterpret_cast<void*>(ptr)); 490 return reinterpret_cast<void*>(ptr); [all...] |
/bionic/libc/arch-x86_64/bionic/ |
H A D | __set_tls.c | 35 __LIBC_HIDDEN__ int __set_tls(void* ptr) { argument 36 return __arch_prctl(ARCH_SET_FS, (uintptr_t) ptr);
|
/bionic/libc/kernel/uapi/linux/mmc/ |
H A D | ioctl.h | 42 #define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr
|
/bionic/libc/arch-x86/bionic/ |
H A D | __set_tls.c | 60 __LIBC_HIDDEN__ int __set_tls(void* ptr) { argument 62 __init_user_desc(&tls_descriptor, true, ptr);
|
/bionic/libc/upstream-netbsd/lib/libc/regex/ |
H A D | regex2.h | 158 uch *ptr; /* -> uch [csetsize] */ member in struct:__anon917 165 #define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c)) 166 #define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c)) 167 #define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
|
/bionic/libc/dns/nameser/ |
H A D | ns_parse.c | 80 ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) { argument 81 const u_char *optr = ptr; 86 b = dn_skipname(ptr, eom); 89 ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/; 91 if (ptr + NS_INT32SZ + NS_INT16SZ > eom) 93 ptr += NS_INT32SZ/*TTL*/; 94 NS_GET16(rdlength, ptr); 95 ptr += rdlength/*RData*/; 98 if (ptr > eom) 100 _DIAGASSERT(__type_fit(int, ptr [all...] |
/bionic/libc/dns/ |
H A D | gethnamaddr.c | 173 #define BOUNDS_CHECK(ptr, count) \ 175 if ((ptr) + (count) > eom) { \ 580 char *ptr = rs->hostbuf; local 582 if (fread(ptr, 1, size, proxy) != size) return NULL; 583 ptr += size; 596 if (fread(ptr, 1, size, proxy) != size) return NULL; 597 *aliases++ = ptr; 598 ptr += size; 616 if (fread(ptr, 1, size, proxy) != size) return NULL; 617 *addrs++ = ptr; 1037 char *tmpbuf, *ptr, **cp; local [all...] |
/bionic/libc/dns/resolv/ |
H A D | res_comp.c | 132 dn_skipname(const u_char *ptr, const u_char *eom) { argument 133 const u_char *saveptr = ptr; 135 if (ns_name_skip(&ptr, eom) == -1) 137 return (ptr - saveptr);
|
/bionic/libc/include/sys/ |
H A D | epoll.h | 61 void* ptr; member in union:epoll_data
|
/bionic/libc/kernel/uapi/drm/ |
H A D | armada_drm.h | 44 uint64_t ptr; member in struct:drm_armada_gem_pwrite
|
/bionic/libc/kernel/uapi/linux/ |
H A D | binder.h | 99 binder_uintptr_t ptr; member in union:binder_transaction_data::__anon200 115 } ptr; member in union:binder_transaction_data::__anon201 121 binder_uintptr_t ptr; member in struct:binder_ptr_cookie 137 binder_uintptr_t ptr; member in struct:binder_pri_ptr_cookie
|
/bionic/libc/kernel/uapi/linux/netfilter/ |
H A D | xt_hashlimit.h | 54 void *ptr; member in union:xt_hashlimit_info::__anon534
|