Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 101) sorted by relevance

12345

/system/core/toolbox/
Dps.c52 char *ptr, *name, *state; in ps_line() local
89 ptr = statline; in ps_line()
90 nexttok(&ptr); // skip pid in ps_line()
91 ptr++; // skip "(" in ps_line()
93 name = ptr; in ps_line()
94 ptr = strrchr(ptr, ')'); // Skip to *last* occurence of ')', in ps_line()
95 *ptr++ = '\0'; // and null-terminate name. in ps_line()
97 ptr++; // skip " " in ps_line()
98 state = nexttok(&ptr); in ps_line()
99 ppid = atoi(nexttok(&ptr)); in ps_line()
[all …]
/system/core/libion/tests/
Dmap_test.cpp41 unsigned char *ptr = NULL; in TEST_F() local
42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F()
43 ASSERT_TRUE(ptr != NULL); in TEST_F()
50 memset(ptr, 0xaa, size); in TEST_F()
52 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()
69 void *ptr; in TEST_F() local
70 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
71 ASSERT_TRUE(ptr != NULL); in TEST_F()
75 memset(ptr, 0xaa, size); in TEST_F()
77 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()
[all …]
Ddevice_test.cpp42 void dirtyCache(void *ptr, size_t size);
62 .ptr = (uint64_t)buf, in readDMA()
76 .ptr = (uint64_t)buf, in writeDMA()
90 .ptr = (uint64_t)buf, in readKernel()
104 .ptr = (uint64_t)buf, in writeKernel()
125 void Device::dirtyCache(void *ptr, size_t size) in dirtyCache() argument
129 ((volatile char *)ptr)[i]; in dirtyCache()
130 ((char *)ptr)[i] = i; in dirtyCache()
147 void *ptr; in TEST_F() local
148 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
[all …]
Dexit_test.cpp101 void *ptr; in TEST_F()
102 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
103 ASSERT_TRUE(ptr != NULL); in TEST_F()
124 void *ptr; in TEST_F()
125 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
126 ASSERT_TRUE(ptr != NULL); in TEST_F()
128 ASSERT_EQ(0, munmap(ptr, size / 2)); in TEST_F()
148 void *ptr; in TEST_F()
149 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
150 ASSERT_TRUE(ptr != NULL); in TEST_F()
[all …]
Dallocate_test.cpp104 void *ptr = NULL; in TEST_F() local
105 ptr = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
106 ASSERT_TRUE(ptr != NULL); in TEST_F()
108 memset(ptr, 0xaa, 4096); in TEST_F()
110 ASSERT_EQ(0, munmap(ptr, 4096)); in TEST_F()
124 void *ptr = NULL; in TEST_F() local
125 ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F()
126 ASSERT_TRUE(ptr != NULL); in TEST_F()
128 ASSERT_EQ(0, memcmp(ptr, zeroes, 4096)); in TEST_F()
130 ASSERT_EQ(0, munmap(ptr, 4096)); in TEST_F()
Dinvalid_values_test.cpp118 unsigned char *ptr; in TEST_F() local
121 int ret = ion_map(0, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd); in TEST_F()
124 EXPECT_EQ(-EBADF, ion_map(-1, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
126 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, 0, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
128 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_badHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
130 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 0, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
132 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, -1, 0, 0, &ptr, &map_fd)); in TEST_F()
134 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, -1, &ptr, &map_fd)); in TEST_F()
138 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, NULL)); in TEST_F()
/system/bt/btcore/src/
Dbdaddr.c54 const uint8_t *ptr = addr->address; in bdaddr_to_string() local
56 ptr[0], ptr[1], ptr[2], in bdaddr_to_string()
57 ptr[3], ptr[4], ptr[5]); in bdaddr_to_string()
85 uint8_t *ptr = new_addr.address; in string_to_bdaddr() local
87 &ptr[0], &ptr[1], &ptr[2], &ptr[3], &ptr[4], &ptr[5]) == 6; in string_to_bdaddr()
/system/media/audio_utils/
Dtinysndfile.c38 static unsigned little2u(unsigned char *ptr) in little2u() argument
40 return (ptr[1] << 8) + ptr[0]; in little2u()
43 static unsigned little4u(unsigned char *ptr) in little4u() argument
45 return (ptr[3] << 24) + (ptr[2] << 16) + (ptr[1] << 8) + ptr[0]; in little4u()
55 static void my_swab(short *ptr, size_t numToSwap) in my_swab() argument
58 *ptr = little2u((unsigned char *) ptr); in my_swab()
60 ++ptr; in my_swab()
289 static void write4u(unsigned char *ptr, unsigned u) in write4u() argument
291 ptr[0] = u; in write4u()
292 ptr[1] = u >> 8; in write4u()
[all …]
/system/core/libion/
Dion_test.c78 unsigned char *ptr; in ion_map_test() local
83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); in ion_map_test()
88 ptr[i] = (unsigned char)i; in ion_map_test()
91 if (ptr[i] != (unsigned char)i) in ion_map_test()
93 "memory\n", __func__, i, ptr[i]); in ion_map_test()
97 munmap(ptr, len); in ion_map_test()
104 munmap(ptr, len); in ion_map_test()
110 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd); in ion_map_test()
137 char *ptr; in ion_share_test() local
144 ptr = mmap(NULL, len, prot, map_flags, share_fd, 0); in ion_share_test()
[all …]
/system/bt/osi/src/
Dallocation_tracker.c36 void *ptr; member
118 void *allocation_tracker_notify_alloc(uint8_t allocator_id, void *ptr, size_t requested_size) { in allocation_tracker_notify_alloc() argument
119 if (!allocations || !ptr) in allocation_tracker_notify_alloc()
120 return ptr; in allocation_tracker_notify_alloc()
122 char *return_ptr = (char *)ptr; in allocation_tracker_notify_alloc()
139 allocation->ptr = return_ptr; in allocation_tracker_notify_alloc()
150 void *allocation_tracker_notify_free(uint8_t allocator_id, void *ptr) { in allocation_tracker_notify_free() argument
151 if (!allocations || !ptr) in allocation_tracker_notify_free()
152 return ptr; in allocation_tracker_notify_free()
156 allocation_t *allocation = (allocation_t *)hash_map_get(allocations, ptr); in allocation_tracker_notify_free()
[all …]
/system/bt/embdrv/sbc/decoder/include/
Doi_bitstream.h74 #define OI_BITSTREAM_GetWritePtr(bs) ((bs)->ptr.w - 3)
75 #define OI_BITSTREAM_GetReadPtr(bs) ((bs)->ptr.r - 3)
80 #define OI_BITSTREAM_READUINT(result, bits, ptr, value, bitPtr) \ argument
91 value = ((value) << 8) | *ptr++; \
98 #define OI_BITSTREAM_WRITEUINT(ptr, value, bitPtr, datum, bits) \ argument
105 *ptr++ = (OI_UINT8)(value >> 24);\
110 #define OI_BITSTREAM_WRITEFLUSH(ptr, value, bitPtr) \ argument
114 *ptr++ = (OI_UINT8)(value >> 24);\
/system/media/audio_utils/include/audio_utils/
Dsndfile.h65 sf_count_t sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desired);
66 sf_count_t sf_readf_float(SNDFILE *handle, float *ptr, sf_count_t desired);
67 sf_count_t sf_readf_int(SNDFILE *handle, int *ptr, sf_count_t desired);
70 sf_count_t sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desired);
71 sf_count_t sf_writef_float(SNDFILE *handle, const float *ptr, sf_count_t desired);
72 sf_count_t sf_writef_int(SNDFILE *handle, const int *ptr, sf_count_t desired);
/system/core/init/
Dparser.cpp28 char *x = state->ptr; in next_token()
40 state->ptr = x; in next_token()
44 state->ptr = x; in next_token()
54 state->ptr = x+1; in next_token()
57 state->ptr = x; in next_token()
66 state->ptr = x; in next_token()
91 state->ptr = x; in next_token()
/system/security/keystore-engine/
Dkeyhandle.cpp40 void keyhandle_free(void *, void *ptr, CRYPTO_EX_DATA*, int, long, void*) { in keyhandle_free() argument
41 char* keyhandle = reinterpret_cast<char*>(ptr); in keyhandle_free()
52 void** ptr = reinterpret_cast<void**>(ptrRef); in keyhandle_dup() local
53 char* keyhandle = reinterpret_cast<char*>(*ptr); in keyhandle_dup()
56 *ptr = keyhandle_copy; in keyhandle_dup()
/system/core/fastboot/
Dusb_linux.c114 char *ptr, int len, int writable, in filter_usb_device() argument
128 if (check(ptr, len, USB_DT_DEVICE, USB_DT_DEVICE_SIZE)) in filter_usb_device()
130 dev = (struct usb_device_descriptor *)ptr; in filter_usb_device()
132 ptr += dev->bLength; in filter_usb_device()
134 if (check(ptr, len, USB_DT_CONFIG, USB_DT_CONFIG_SIZE)) in filter_usb_device()
136 cfg = (struct usb_config_descriptor *)ptr; in filter_usb_device()
138 ptr += cfg->bLength; in filter_usb_device()
182 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)ptr; in filter_usb_device()
186 ptr += hdr->bLength; in filter_usb_device()
192 ifc = (struct usb_interface_descriptor *)ptr; in filter_usb_device()
[all …]
Dprotocol.c228 const char *ptr = data; in fb_download_data_sparse_write() local
233 memcpy(usb_buf + usb_buf_len, ptr, to_write); in fb_download_data_sparse_write()
235 ptr += to_write; in fb_download_data_sparse_write()
253 r = _command_data(usb, ptr, to_write); in fb_download_data_sparse_write()
257 ptr += to_write; in fb_download_data_sparse_write()
266 memcpy(usb_buf, ptr, len); in fb_download_data_sparse_write()
/system/core/toolbox/upstream-netbsd/bin/dd/
Dmisc.c197 const char *ptr; in dd_write_msg() local
211 for (ptr = fmt; *ptr; ptr++) { in dd_write_msg()
212 if (*ptr != '%') { in dd_write_msg()
213 ADDC(*ptr); in dd_write_msg()
217 switch (*++ptr) { in dd_write_msg()
295 ADDC(*ptr); in dd_write_msg()
298 if (*ptr == '\0') in dd_write_msg()
301 "msgfmt string", *ptr); in dd_write_msg()
/system/bt/embdrv/sbc/decoder/srce/
Dbitstream-decode.c44 bs->ptr.r = buffer + 3; in OI_BITSTREAM_ReadInit()
52 OI_BITSTREAM_READUINT(result, bits, bs->ptr.r, bs->value, bs->bitPtr); in OI_BITSTREAM_ReadUINT()
69 bs->value = (bs->value << 8) | *bs->ptr.r++; in OI_BITSTREAM_ReadUINT4Aligned()
83 bs->value = (bs->value << 8) | *bs->ptr.r++; in OI_BITSTREAM_ReadUINT8Aligned()
/system/core/libbacktrace/
DBacktraceCurrent.cpp39 bool BacktraceCurrent::ReadWord(uintptr_t ptr, word_t* out_value) { in ReadWord() argument
40 if (!VerifyReadWordArgs(ptr, out_value)) { in ReadWord()
45 FillInMap(ptr, &map); in ReadWord()
47 *out_value = *reinterpret_cast<word_t*>(ptr); in ReadWord()
50 BACK_LOGW("pointer %p not in a readable map", reinterpret_cast<void*>(ptr)); in ReadWord()
DBacktracePtrace.cpp46 bool BacktracePtrace::ReadWord(uintptr_t ptr, word_t* out_value) { in ReadWord() argument
51 if (!VerifyReadWordArgs(ptr, out_value)) { in ReadWord()
56 FillInMap(ptr, &map); in ReadWord()
61 return PtraceRead(Tid(), ptr, out_value); in ReadWord()
/system/core/libcutils/tests/
DMemsetTest.cpp90 uint64_t ptr = reinterpret_cast<uint64_t>(orig_ptr); in GetAlignedPtr() local
95 ptr += alignment - (ptr & (alignment - 1)); in GetAlignedPtr()
96 ptr |= alignment | or_mask; in GetAlignedPtr()
99 return reinterpret_cast<void*>(ptr); in GetAlignedPtr()
/system/core/libnativebridge/
Dnative_bridge.cc116 const char* ptr = nb_library_filename; in NativeBridgeNameAcceptable() local
117 if (*ptr == 0) { in NativeBridgeNameAcceptable()
122 if (!CharacterAllowed(*ptr, true)) { in NativeBridgeNameAcceptable()
126 *ptr); in NativeBridgeNameAcceptable()
130 ptr++; in NativeBridgeNameAcceptable()
131 while (*ptr != 0) { in NativeBridgeNameAcceptable()
132 if (!CharacterAllowed(*ptr, false)) { in NativeBridgeNameAcceptable()
134 ALOGE("Native bridge library %s has been rejected for %c", nb_library_filename, *ptr); in NativeBridgeNameAcceptable()
137 ptr++; in NativeBridgeNameAcceptable()
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
Dutil.c395 void *ptr; in grep_malloc() local
397 if ((ptr = malloc(size)) == NULL) in grep_malloc()
399 return (ptr); in grep_malloc()
408 void *ptr; in grep_calloc() local
410 if ((ptr = calloc(nmemb, size)) == NULL) in grep_calloc()
412 return (ptr); in grep_calloc()
419 grep_realloc(void *ptr, size_t size) in grep_realloc() argument
422 if ((ptr = realloc(ptr, size)) == NULL) in grep_realloc()
424 return (ptr); in grep_realloc()
/system/bt/osi/include/
Dallocation_tracker.h47 void *allocation_tracker_notify_alloc(allocator_id_t allocator_id, void *ptr, size_t requested_size…
54 void *allocation_tracker_notify_free(allocator_id_t allocator_id, void *ptr);
Dallocator.h25 typedef void (*free_fn)(void *ptr);
40 void osi_free(void *ptr);

12345