Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 586) sorted by relevance

12345678910>>...24

/system/media/audio_utils/tests/
Dpower_tests.cpp29 void testFloatValue(float f_value, size_t length) { in testFloatValue() argument
31 float f_ary[length]; in testFloatValue()
32 uint8_t u8_ary[length]; in testFloatValue()
33 int16_t i16_ary[length]; in testFloatValue()
34 int32_t i32_ary[length]; in testFloatValue()
35 int32_t q8_23_ary[length]; in testFloatValue()
36 uint8x3_t p24_ary[length]; in testFloatValue()
60 for (size_t i = 0; i < length; ++i) { in testFloatValue()
71 if (i >= length) break; in testFloatValue()
73 audio_utils_compute_power_mono(f_ary + i, AUDIO_FORMAT_PCM_FLOAT, length - i)); in testFloatValue()
[all …]
/system/bt/osi/src/
Dringbuffer.cc59 size_t ringbuffer_insert(ringbuffer_t* rb, const uint8_t* p, size_t length) { in ringbuffer_insert() argument
63 if (length > ringbuffer_available(rb)) length = ringbuffer_available(rb); in ringbuffer_insert()
65 for (size_t i = 0; i != length; ++i) { in ringbuffer_insert()
70 rb->available -= length; in ringbuffer_insert()
71 return length; in ringbuffer_insert()
74 size_t ringbuffer_delete(ringbuffer_t* rb, size_t length) { in ringbuffer_delete() argument
77 if (length > ringbuffer_size(rb)) length = ringbuffer_size(rb); in ringbuffer_delete()
79 rb->head += length; in ringbuffer_delete()
82 rb->available += length; in ringbuffer_delete()
83 return length; in ringbuffer_delete()
[all …]
Dbuffer.cc32 size_t length; member
44 buffer->length = size; in buffer_new()
51 return buffer_new_slice(buf, buf->length); in buffer_new_ref()
57 CHECK(slice_size <= buf->length); in buffer_new_slice()
63 ret->length = slice_size; in buffer_new_slice()
85 return buf->root->data + buf->root->length - buf->length; in buffer_ptr()
90 return buf->length; in buffer_length()
/system/bt/hci/src/
Dbtsnoop_mem.cc40 size_t length = 0; in btsnoop_mem_capture() local
44 if (packet->len > 2) length = data[2] + 3; in btsnoop_mem_capture()
48 if (packet->len > 1) length = data[1] + 2; in btsnoop_mem_capture()
53 if (packet->len > 3) length = (data[2] | (data[3] << 8)) + 4; in btsnoop_mem_capture()
58 if (packet->len > 2) length = data[2] + 3; in btsnoop_mem_capture()
63 if (packet->len > 3) length = (data[2] | ((data[3] & 0x3f) << 8)) + 4; in btsnoop_mem_capture()
67 if (length && data_callback) in btsnoop_mem_capture()
68 (*data_callback)(type, data, length, timestamp_us); in btsnoop_mem_capture()
69 if (length && attribution_callback && in btsnoop_mem_capture()
71 (*attribution_callback)(type, data, length, timestamp_us); in btsnoop_mem_capture()
/system/nfc/utils/
Dringbuffer.cc61 size_t ringbuffer_insert(ringbuffer_t* rb, const uint8_t* p, size_t length) { in ringbuffer_insert() argument
65 if (length > ringbuffer_available(rb)) length = ringbuffer_available(rb); in ringbuffer_insert()
67 for (size_t i = 0; i != length; ++i) { in ringbuffer_insert()
72 rb->available -= length; in ringbuffer_insert()
73 return length; in ringbuffer_insert()
76 size_t ringbuffer_delete(ringbuffer_t* rb, size_t length) { in ringbuffer_delete() argument
79 if (length > ringbuffer_size(rb)) length = ringbuffer_size(rb); in ringbuffer_delete()
81 rb->head += length; in ringbuffer_delete()
84 rb->available += length; in ringbuffer_delete()
85 return length; in ringbuffer_delete()
[all …]
/system/core/fastboot/
Dsocket.cpp51 ssize_t Socket::ReceiveAll(void* data, size_t length, int timeout_ms) { in ReceiveAll() argument
54 while (total < length) { in ReceiveAll()
55 ssize_t bytes = Receive(reinterpret_cast<char*>(data) + total, length - total, timeout_ms); in ReceiveAll()
116 bool Send(const void* data, size_t length) override;
118 ssize_t Receive(void* data, size_t length, int timeout_ms) override;
137 bool UdpSocket::Send(const void* data, size_t length) { in Send() argument
138 return TEMP_FAILURE_RETRY(sendto(sock_, reinterpret_cast<const char*>(data), length, 0, in Send()
140 static_cast<ssize_t>(length); in Send()
146 total_length += buffer.length; in Send()
153 ssize_t UdpSocket::Receive(void* data, size_t length, int timeout_ms) { in Receive() argument
[all …]
Dtcp.cpp50 static void EncodeMessageLength(uint64_t length, void* buffer) { in EncodeMessageLength() argument
52 reinterpret_cast<uint8_t*>(buffer)[i] = length >> (56 - i * 8); in EncodeMessageLength()
64 ssize_t Read(void* data, size_t length) override;
65 ssize_t Write(const void* data, size_t length) override;
128 ssize_t TcpTransport::Read(void* data, size_t length) { in Read() argument
144 if (length > message_bytes_left_) { in Read()
145 length = message_bytes_left_; in Read()
147 ssize_t bytes_read = socket_->ReceiveAll(data, length, 0); in Read()
156 ssize_t TcpTransport::Write(const void* data, size_t length) { in Write() argument
163 EncodeMessageLength(length, header); in Write()
[all …]
/system/extras/verity/
DBootSignature.java70 private ASN1Integer length; field in BootSignature
92 public BootSignature(String target, int length) { in BootSignature() argument
95 this.length = new ASN1Integer(length); in BootSignature()
126 length = (ASN1Integer) attrs.getObjectAt(1); in BootSignature()
134 attrs.add(length); in getAuthenticatedAttributes()
168 byte[] signable = Arrays.copyOf(image, image.length + attrs.length); in generateSignableImage()
169 for (int i=0; i < attrs.length; i++) { in generateSignableImage()
170 signable[i+image.length] = attrs[i]; in generateSignableImage()
181 if (length.getValue().intValue() != image.length) { in verify()
218 int length = pageSize // include the page aligned image header in getSignableImageSize() local
[all …]
/system/tools/aidl/tests/java/src/android/aidl/service/
DTestServiceServer.java76 return foos.length; in returnsLengthOfFooArray()
156 boolean[] reversed = new boolean[input.length]; in ReverseBoolean()
157 for (int i = 0; i < input.length; i++) { in ReverseBoolean()
159 reversed[i] = input[input.length - i - 1]; in ReverseBoolean()
165 byte[] reversed = new byte[input.length]; in ReverseByte()
166 for (int i = 0; i < input.length; i++) { in ReverseByte()
168 reversed[i] = input[input.length - i - 1]; in ReverseByte()
174 char[] reversed = new char[input.length]; in ReverseChar()
175 for (int i = 0; i < input.length; i++) { in ReverseChar()
177 reversed[i] = input[input.length - i - 1]; in ReverseChar()
[all …]
/system/update_engine/common/
Dhash_calculator.cc37 bool HashCalculator::Update(const void* data, size_t length) { in Update() argument
42 TEST_AND_RETURN_FALSE(SHA256_Update(&ctx_, data, length) == 1); in Update()
46 off_t HashCalculator::UpdateFile(const string& name, off_t length) { in UpdateFile() argument
55 while (length < 0 || bytes_processed < length) { in UpdateFile()
57 if (length >= 0 && bytes_to_read > length - bytes_processed) { in UpdateFile()
58 bytes_to_read = length - bytes_processed; in UpdateFile()
84 size_t length, in RawHashOfBytes() argument
87 TEST_AND_RETURN_FALSE(calc.Update(data, length)); in RawHashOfBytes()
104 off_t length, in RawHashOfFile() argument
107 off_t res = calc.UpdateFile(name, length); in RawHashOfFile()
Dmulti_range_http_fetcher.cc79 base_fetcher_->SetLength(range.length()); in StartTransfer()
91 size_t length) { in ReceivedBytes() argument
95 size_t next_size = length; in ReceivedBytes()
99 std::min(next_size, range.length() - bytes_received_this_range_); in ReceivedBytes()
105 bytes_received_this_range_ += length; in ReceivedBytes()
109 if (range.HasLength() && bytes_received_this_range_ >= range.length()) { in ReceivedBytes()
142 if (bytes_received_this_range_ < range.length()) { in TransferEnded()
190 range_str += std::to_string(length()); in ToString()
199 if (!range.HasLength() || static_cast<size_t>(offset) < range.length()) { in SetOffset()
204 base_fetcher_->SetLength(range.length()); in SetOffset()
[all …]
/system/bt/btif/src/
Dbtif_debug_btsnoop.cc44 size_t length);
47 const size_t length, const uint64_t timestamp_us) { in btsnoop_cb() argument
50 size_t included_length = btsnoop_calculate_packet_length(type, data, length); in btsnoop_cb()
60 ringbuffer_delete(buffer, header.length - 1); in btsnoop_cb()
65 header.length = included_length + 1; // +1 for type byte in btsnoop_cb()
66 header.packet_length = length + 1; // +1 for type byte. in btsnoop_cb()
77 size_t length) { in btsnoop_calculate_packet_length() argument
92 return length; in btsnoop_calculate_packet_length()
95 return length; in btsnoop_calculate_packet_length()
101 if (length > len_hci_acl) { in btsnoop_calculate_packet_length()
[all …]
/system/bt/tools/scripts/
Dbtsnooz.py101 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
102 offset += 7 + length - 1
108 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
111 sys.stdout.write(struct.pack('>II', length, length))
115 sys.stdout.write(decompressed[offset:offset + length - 1])
116 offset += length - 1
128length, packet_length, delta_time_ms, snooz_type = struct.unpack_from('=HHIb', decompressed, offse…
129 offset += 9 + length - 1
135length, packet_length, delta_time_ms, snooz_type = struct.unpack_from('=HHIb', decompressed, offse…
138 sys.stdout.write(struct.pack('>II', packet_length, length))
[all …]
/system/tools/aidl/tests/java/src/android/aidl/tests/
DTestServiceClient.java121 for (int i = 0; i < query.length; i++) { in testConstRepeat()
176 boolean echoed[] = new boolean[input.length]; in testBooleanArrayReversal()
179 assertThat(reversed.length, is(input.length)); in testBooleanArrayReversal()
180 for (int i = 0; i < input.length; ++i) { in testBooleanArrayReversal()
181 int j = reversed.length - (1 + i); in testBooleanArrayReversal()
189 byte echoed[] = new byte[input.length]; in testByteArrayReversal()
192 assertThat(reversed.length, is(input.length)); in testByteArrayReversal()
193 for (int i = 0; i < input.length; ++i) { in testByteArrayReversal()
194 int j = reversed.length - (1 + i); in testByteArrayReversal()
202 char echoed[] = new char[input.length]; in testCharArrayReversal()
[all …]
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_messages.h44 length = 0; in SizedBuffer()
47 if (buffer && length > 0) { in ~SizedBuffer()
48 memset_s(buffer.get(), 0, length); in ~SizedBuffer()
58 length = 0; in SizedBuffer()
61 length = len; in SizedBuffer()
65 SizedBuffer(SizedBuffer && rhs) : buffer(move(rhs.buffer)), length(rhs.length) { in SizedBuffer()
66 rhs.length = 0; in SizedBuffer()
72 length = rhs.length;
73 rhs.length = 0;
82 uint32_t size() const { return buffer ? length : 0; } in size()
[all …]
/system/chre/chpp/
Dtransport.c199 } else if (context->rxHeader.length == 0) { in chppConsumeHeader()
207 if (context->rxDatagram.length == 0) { in chppConsumeHeader()
209 tempPayload = chppMalloc(context->rxHeader.length); in chppConsumeHeader()
214 context->rxDatagram.length + context->rxHeader.length, in chppConsumeHeader()
215 context->rxDatagram.length); in chppConsumeHeader()
224 context->rxDatagram.length += context->rxHeader.length; in chppConsumeHeader()
246 CHPP_ASSERT(context->rxStatus.locInState < context->rxHeader.length); in chppConsumePayload()
248 MIN(len, (context->rxHeader.length - context->rxStatus.locInState)); in chppConsumePayload()
254 if (context->rxStatus.locInState == context->rxHeader.length) { in chppConsumePayload()
290 context->rxHeader.length, context->rxHeader.seq, in chppConsumeFooter()
[all …]
/system/chre/chpp/common/
Dwifi_convert.c114 out->scannedFreqList.length = in->scannedFreqListLen * sizeof(uint32_t); in chppWifiConvertScanEventFromChre()
115 CHPP_ASSERT((size_t)(*vlaOffset + out->scannedFreqList.length) <= in chppWifiConvertScanEventFromChre()
117 if (out->scannedFreqList.length > 0 && in chppWifiConvertScanEventFromChre()
118 *vlaOffset + out->scannedFreqList.length <= payloadSize) { in chppWifiConvertScanEventFromChre()
122 *vlaOffset += out->scannedFreqList.length; in chppWifiConvertScanEventFromChre()
129 out->results.length = in->resultCount * sizeof(struct ChppWifiScanResult); in chppWifiConvertScanEventFromChre()
130 CHPP_ASSERT((size_t)(*vlaOffset + out->results.length) <= payloadSize); in chppWifiConvertScanEventFromChre()
131 if (out->results.length > 0 && in chppWifiConvertScanEventFromChre()
132 *vlaOffset + out->results.length <= payloadSize) { in chppWifiConvertScanEventFromChre()
137 *vlaOffset += out->results.length; in chppWifiConvertScanEventFromChre()
[all …]
/system/incremental_delivery/incfs/util/
Dmap_ptr.cpp37 size_t IncFsFileMap::length() const { in length() function in android::incfs::IncFsFileMap
49 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name) { in Create() argument
50 return Create(fd, offset, length, file_name, true /* verify */); in Create()
64 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name, in Create() argument
66 return CreateForceVerification(fd, offset, length, file_name, in Create()
70 bool IncFsFileMap::CreateForceVerification(int fd, off64_t offset, size_t length, in CreateForceVerification() argument
73 if (!map_->create(file_name, fd, offset, length, true /* readOnly */)) { in CreateForceVerification()
83 size_t base_length_ = length + offset_diff; in CreateForceVerification()
139 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name, in Create() argument
141 return CreateForceVerification(fd, offset, length, file_name, verify); in Create()
[all …]
/system/core/gatekeeperd/
DGateKeeperResponse.cpp41 ssize_t length = in->readInt32(); in readFromParcel() local
42 if (length > 0) { in readFromParcel()
43 length = in->readInt32(); in readFromParcel()
44 const uint8_t* buf = reinterpret_cast<const uint8_t*>(in->readInplace(length)); in readFromParcel()
46 LOG(ERROR) << "readInplace returned null buffer for length " << length; in readFromParcel()
49 payload_.resize(length); in readFromParcel()
50 std::copy(buf, buf + length, payload_.data()); in readFromParcel()
/system/core/fs_mgr/libdm/include/libdm/
Ddm_target.h64 DmTarget(uint64_t start, uint64_t length) : start_(start), length_(length) {} in DmTarget() argument
98 DmTargetZero(uint64_t start, uint64_t length) : DmTarget(start, length) {} in DmTargetZero() argument
106 DmTargetLinear(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetLinear() argument
108 : DmTarget(start, length), block_device_(block_device), physical_sector_(physical_sector) {} in DmTargetLinear()
121 DmTargetVerity(uint64_t start, uint64_t length, uint32_t version,
143 DmTargetAndroidVerity(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetAndroidVerity() argument
145 : DmTarget(start, length), keyid_(keyid), block_device_(block_device) {} in DmTargetAndroidVerity()
160 DmTargetVerityString(uint64_t start, uint64_t length, const std::string& target_string) in DmTargetVerityString() argument
161 : DmTarget(start, length), target_string_(target_string) {} in DmTargetVerityString()
175 DmTargetBow(uint64_t start, uint64_t length, const std::string& target_string) in DmTargetBow() argument
[all …]
/system/netd/libnetdutils/
DInternetAddresses.cpp91 IPPrefix::IPPrefix(const IPAddress& ip, int length) : IPPrefix(ip) { in IPPrefix() argument
94 if (length < 0) return; in IPPrefix()
95 if (length >= mData.cidrlen) return; in IPPrefix()
101 const in_addr_t mask = (length > 0) ? (~0U) << (IPV4_ADDR_BITS - length) : 0U; in IPPrefix()
103 mData.cidrlen = static_cast<uint8_t>(length); in IPPrefix()
108 const int which = length / 8; in IPPrefix()
109 const int mask = (length % 8 == 0) ? 0 : 0xff << (8 - length % 8); in IPPrefix()
114 mData.cidrlen = static_cast<uint8_t>(length); in IPPrefix()
/system/extras/simpleperf/scripts/purgatorio/templates/
Dmain.js30 for (var i = 0; i < name.length; i++) {
48 if (nameArr.length > 1) {
49 name = nameArr[nameArr.length - 1] // drop module name if present
86 let selection_len = graph_selection.length;
106 for (let e = 0; e < callchain.length; e ++) {
121 table_source.data.index.push(table_source.data.thread.length)
133 for (t = 0; t < filter_index.length; t ++) {
139 if (filter_index.length > 0) {
153 for (let e = 0; e < callchain.length; e ++) {
157 for (let j = 0; j < node.children.length; j ++) {
[all …]
/system/nfc/src/nfc/tags/
Dce_t4t.cc154 static bool ce_t4t_read_binary(uint16_t offset, uint8_t length) { in ce_t4t_read_binary() argument
162 offset, length, p_t4t->status); in ce_t4t_read_binary()
184 p_r_apdu->len = length; in ce_t4t_read_binary()
188 if ((p_t4t->status & CE_T4T_STATUS_NDEF_SELECTED) && (length > 0)) { in ce_t4t_read_binary()
192 if (length == 1) { in ce_t4t_read_binary()
193 length = 0; in ce_t4t_read_binary()
196 length -= T4T_FILE_LENGTH_SIZE; in ce_t4t_read_binary()
201 length--; in ce_t4t_read_binary()
207 if (length > 0) { in ce_t4t_read_binary()
208 memcpy(p_dst, p_src + offset, length); in ce_t4t_read_binary()
[all …]
/system/logging/liblog/
Dpmsg_writer.cpp185 size_t length, packet_len; in __android_log_pmsg_file_write() local
216 length = strlen(tag) + 1; in __android_log_pmsg_file_write()
217 packet_len = LOGGER_ENTRY_MAX_PAYLOAD - sizeof(char) - length; in __android_log_pmsg_file_write()
222 vec[1].iov_len = length; in __android_log_pmsg_file_write()
224 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write()
229 len -= length; in __android_log_pmsg_file_write()
233 transfer = length; in __android_log_pmsg_file_write()
236 if ((transfer < length) && (buf[transfer] == '\n')) { in __android_log_pmsg_file_write()
248 return ret ? ret : (len - length); in __android_log_pmsg_file_write()
250 length -= transfer; in __android_log_pmsg_file_write()
/system/bt/device/src/
Dinterop.cc68 strlen(name) >= interop_name_database[i].length && in interop_match_name()
70 interop_name_database[i].length) == 0) { in interop_match_name()
81 size_t length) { in interop_database_add() argument
83 CHECK(length > 0); in interop_database_add()
84 CHECK(length < RawAddress::kLength); in interop_database_add()
88 memcpy(&entry->addr, addr, length); in interop_database_add()
90 entry->length = length; in interop_database_add()
165 memcmp(addr, &entry->addr, entry->length) == 0) in interop_match_dynamic_()
182 interop_addr_database[i].length) == 0) { in interop_match_fixed_()

12345678910>>...24