/system/bt/osi/src/ |
H A D | array.c | 21 #include "osi/include/array.h" 38 static bool grow(array_t *array); 45 array_t *array = osi_calloc(sizeof(array_t) + element_size * INTERNAL_ELEMENTS); local 47 array->element_size = element_size; 48 array->capacity = INTERNAL_ELEMENTS; 49 array->data = array->internal_storage; 50 return array; 53 void array_free(array_t *array) { argument 54 if (!array) 63 array_ptr(const array_t *array) argument 67 array_at(const array_t *array, size_t index) argument 73 array_length(const array_t *array) argument 78 array_append_value(array_t *array, uint32_t value) argument 82 array_append_ptr(array_t *array, void *data) argument 96 grow(array_t *array) argument [all...] |
/system/bt/osi/test/ |
H A D | array_test.cpp | 6 #include "osi/include/array.h" 12 array_t *array = array_new(4); local 13 ASSERT_TRUE(array != NULL); 14 array_free(array); 22 array_t *array = array_new(4); local 23 EXPECT_DEATH(array_ptr(array), ""); 24 array_free(array); 28 array_t *array = array_new(4); local 29 EXPECT_DEATH(array_at(array, 1), ""); 30 array_free(array); 34 array_t *array = array_new(sizeof(int)); local 46 array_t *array = array_new(sizeof(int)); local 69 array_t *array = array_new(128); local [all...] |
/system/bt/osi/include/ |
H A D | array.h | 27 // Returns a new array object that stores elements of size |element_size|. The returned 32 // Frees an array that was allocated with |array_new|. |array| may be NULL. 33 void array_free(array_t *array); 35 // Returns a pointer to the first stored element in |array|. |array| must not be NULL. 36 void *array_ptr(const array_t *array); 38 // Returns a pointer to the |index|th element of |array|. |index| must be less than 39 // the array's length. |array| mus [all...] |
/system/connectivity/shill/net/ |
H A D | control_netlink_attribute.cc | 47 NestedData array(kTypeNested, "FIRST", true); 48 array.deeper_nesting.insert(AttrDataPair( 50 array.deeper_nesting.insert(AttrDataPair( 52 array.deeper_nesting.insert(AttrDataPair( 55 nested_template_.insert(AttrDataPair(kArrayAttrEnumVal, array)); 64 NestedData array(kTypeNested, "FIRST", true); 65 array.deeper_nesting.insert( 68 array.deeper_nesting.insert( 71 array.deeper_nesting.insert( 75 nested_template_.insert(AttrDataPair(kArrayAttrEnumVal, array)); [all...] |
/system/bt/service/common/bluetooth/ |
H A D | uuid.h | 19 #include <array> 34 typedef std::array<uint8_t, kNumBytes16> UUID16Bit; 35 typedef std::array<uint8_t, kNumBytes32> UUID32Bit; 36 typedef std::array<uint8_t, kNumBytes128> UUID128Bit; 56 // std::array variants constructors.
|
/system/extras/perfprofd/quipper/base/ |
H A D | macros.h | 49 // The arraysize(arr) macro returns the # of elements in an array arr. 54 // One caveat is that arraysize() doesn't accept any array of an 64 char (&ArraySizeHelper(T (&array)[N]))[N]; 71 char (&ArraySizeHelper(const T (&array)[N]))[N]; 74 #define arraysize(array) (sizeof(ArraySizeHelper(array))) 96 // the array) and sizeof(*(arr)) (the # of bytes in one array 98 // indeed an array, in which case the division result is the # of 99 // elements in the array [all...] |
/system/tools/aidl/tests/ |
H A D | aidl_test_client_file_descriptors.cpp | 139 vector<ScopedFd> array; local 140 array.resize(2); 142 if (!DoPipe(&array[0], &array[1])) { 149 status = s->ReverseFileDescriptorArray(array, &repeated, &reversed); 152 cerr << "Could not reverse file descriptor array." << endl; 157 DoWrite(FdByName(array[1]), "First") &&
|
/system/core/base/include/android-base/ |
H A D | macros.h | 67 // The arraysize(arr) macro returns the # of elements in an array arr. 72 // One caveat is that arraysize() doesn't accept any array of an 82 char(&ArraySizeHelper(T(&array)[N]))[N]; // NOLINT(readability/casting) 84 #define arraysize(array) (sizeof(ArraySizeHelper(array))) 106 // the array) and sizeof(*(arr)) (the # of bytes in one array 108 // indeed an array, in which case the division result is the # of 109 // elements in the array. Otherwise, arr cannot possibly be an array, [all...] |
/system/core/libutils/ |
H A D | VectorImpl.cpp | 126 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) argument 132 _do_copy(where, array, length); 137 ssize_t VectorImpl::appendArray(const void* array, size_t length) argument 139 return insertArrayAt(array, size(), length); 179 void* array = const_cast<void*>(arrayImpl()); local 183 void* item = reinterpret_cast<char*>(array) + mItemSize*(i); 184 void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); 188 // we're going to have to modify the array... 189 array = editArrayImpl(); 190 if (!array) retur [all...] |
/system/extras/perfprofd/quipper/ |
H A D | perf_reader.cc | 250 const uint64_t* ReadReadInfo(const uint64_t* array, argument 255 sample->read.time_enabled = *array++; 257 sample->read.time_running = *array++; 259 sample->read.one.id = *array++; 267 return array; 272 const uint64_t* ReadCallchain(const uint64_t* array, argument 280 uint64_t callchain_size = *array++; 287 callchain->ips[i] = *array++; 293 return array; 298 const uint64_t* ReadRawData(const uint64_t* array, argument 321 ReadBranchStack(const uint64_t* array, bool swap_bytes, struct perf_sample* sample) argument 351 ReadPerfSampleFromData(const perf_event_type event_type, const uint64_t* array, const uint64_t sample_fields, const uint64_t read_format, bool swap_bytes, struct perf_sample* sample) argument 483 WritePerfSampleToData(const perf_event_type event_type, const struct perf_sample& sample, const uint64_t sample_fields, const uint64_t read_format, uint64_t* array) argument [all...] |
H A D | perf_utils.cc | 43 string HexToString(const u8* array, size_t length) { argument 49 snprintf(buffer, sizeof(buffer), "%02x", array[i]); 55 bool StringToHex(const string& str, u8* array, size_t length) { argument 59 // Stop when there are no more characters, or the array has been filled. 64 array[i] = strtol(one_byte.c_str(), &err, kHexRadix); 119 offset = offsetof(event_t, sample.array);
|
H A D | perf_utils.h | 62 // Returns a string that represents |array| in hexadecimal. 63 string HexToString(const u8* array, size_t length); 65 // Converts |str| to a hexadecimal number, stored in |array|. Returns true on 68 bool StringToHex(const string& str, u8* array, size_t length);
|
/system/core/include/utils/ |
H A D | Vector.h | 90 * C-style array access 94 inline const TYPE* array() const; 110 * modifying the array 129 //! insert an array at a given index 130 ssize_t insertArrayAt(const TYPE* array, size_t index, size_t length); 132 //! append an array at the end of this vector 133 ssize_t appendArray(const TYPE* array, size_t length); 168 * sort (stable) the array 190 inline const_iterator begin() const { return array(); } 191 inline const_iterator end() const { return array() 268 const TYPE* Vector<TYPE>::array() const { function in class:android::Vector 317 insertArrayAt(const TYPE* array, size_t index, size_t length) argument 322 appendArray(const TYPE* array, size_t length) argument [all...] |
H A D | VectorImpl.h | 58 /*! C-style array access */ 69 /*! append/insert another vector or array */ 72 ssize_t insertArrayAt(const void* array, size_t index, size_t length); 73 ssize_t appendArray(const void* array, size_t length); 170 ssize_t insertArrayAt(const void* array, size_t index, size_t length); 171 ssize_t appendArray(const void* array, size_t length);
|
H A D | SortedVector.h | 74 * C-style array access 78 inline const TYPE* array() const; 80 //! read-write C-style access. BE VERY CAREFUL when modifying the array 103 * modifying the array 177 const TYPE* SortedVector<TYPE>::array() const { function in class:android::SortedVector 192 return *(array() + index); 202 return *(array() + size() - 1);
|
/system/extras/latencytop/ |
H A D | latencytop.c | 370 struct latency_entry *e, **array; local 382 array = calloc(count, sizeof(struct latency_entry *)); 383 if (!array) { 384 fprintf(stderr, "Error allocating array: %s\n", strerror(errno)); 388 array[i] = e; 392 qsort(array, count, sizeof(struct latency_entry *), &lat_cmp); 396 e = array[i]; 405 free(array);
|
/system/bt/stack/pan/ |
H A D | pan_utils.c | 115 UINT8 array[10], *p; local 118 p = array; 120 SDP_AddAttribute (sdp_handle, ATTR_ID_NET_ACCESS_TYPE, UINT_DESC_TYPE, 2, array); 123 p = array; 125 SDP_AddAttribute (sdp_handle, ATTR_ID_MAX_NET_ACCESS_RATE, UINT_DESC_TYPE, 4, array);
|
/system/core/libutils/tests/ |
H A D | Vector_test.cpp | 99 // inserting a NULL array, we'll fail with a SIGSEGV eventually. We need 140 ASSERT_EQ(vector1.array(), vector2.array()); 142 // of this array.
|
/system/bt/service/ |
H A D | gatt_server_old.h | 18 #include <array>
|
/system/extras/simpleperf/ |
H A D | record_file_writer.cpp | 209 std::vector<char> array(len, '\0'); 210 std::copy(arg.begin(), arg.end(), array.begin()); 211 if (!Write(array.data(), array.size())) {
|
/system/bt/service/test/ |
H A D | uuid_unittest.cpp | 18 #include <array> 29 const std::array<uint8_t, UUID::kNumBytes128> kBtSigBaseUUID = {
|
/system/keymaster/include/keymaster/ |
H A D | android_keymaster_utils.h | 46 * to allow size-based array operations without explicitly specifying the size. If passed a pointer 47 * rather than an array, they'll fail to compile. 51 * Return the size in bytes of the array \p a. 58 * Return the number of elements in array \p a. 65 * Duplicate the array \p a. The memory for the new array is allocated and the caller takes 77 * Duplicate the array \p a. The memory for the new array is allocated and the caller takes 79 * array_length() on the original array to discover the size. 92 * Copy the contents of array \ 169 ArrayWrapper(T* array, size_t size) argument [all...] |
/system/media/camera/docs/ |
H A D | metadata_parser_xml.py | 253 array = entry.find('array') 254 if array is not None: 256 for size in array.find_all('size'):
|
/system/bt/bta/sdp/ |
H A D | bta_sdp_act.c | 114 record->mns.hdr.service_name = (char *)p_attr->attr_value.v.array; 167 record->mas.hdr.service_name = (char *)p_attr->attr_value.v.array; 213 record->pse.hdr.service_name = (char *)p_attr->attr_value.v.array; 249 record->ops.hdr.service_name = (char *)p_attr->attr_value.v.array; 329 record->sap.hdr.service_name = (char *)p_attr->attr_value.v.array; 359 record->pse.hdr.service_name = (char *)p_attr->attr_value.v.array;
|
/system/bt/bta/mce/ |
H A D | bta_mce_act.c | 98 evt_data.mas[found].p_srv_name = (char *) p_attr->attr_value.v.array;
|