Home
last modified time | relevance | path

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

12345678910>>...21

/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/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/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()
99 off_t length, in RawHashOfFile() argument
102 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/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_app/src/android/aidl/tests/
DTestServiceClient.java110 for (int i = 0; i < query.length; i++) { in testConstRepeat()
165 boolean echoed[] = new boolean[input.length]; in testBooleanArrayReversal()
168 assertThat(reversed.length, is(input.length)); in testBooleanArrayReversal()
169 for (int i = 0; i < input.length; ++i) { in testBooleanArrayReversal()
170 int j = reversed.length - (1 + i); in testBooleanArrayReversal()
178 byte echoed[] = new byte[input.length]; in testByteArrayReversal()
181 assertThat(reversed.length, is(input.length)); in testByteArrayReversal()
182 for (int i = 0; i < input.length; ++i) { in testByteArrayReversal()
183 int j = reversed.length - (1 + i); in testByteArrayReversal()
191 char echoed[] = new char[input.length]; in testCharArrayReversal()
[all …]
/system/bt/hci/src/
Dbtsnoop_mem.cc34 size_t length = 0; in btsnoop_mem_capture() local
38 if (packet->len > 2) length = data[2] + 3; in btsnoop_mem_capture()
42 if (packet->len > 1) length = data[1] + 2; in btsnoop_mem_capture()
47 if (packet->len > 3) length = (data[2] | (data[3] << 8)) + 4; in btsnoop_mem_capture()
52 if (packet->len > 2) length = data[2] + 3; in btsnoop_mem_capture()
56 if (length) (*data_callback)(type, data, length, timestamp_us); in btsnoop_mem_capture()
/system/core/adb/client/
Dfastdeploycallbacks.cpp30 static void appendBuffer(std::vector<char>* buffer, const char* input, int length) { in appendBuffer() argument
32 buffer->insert(buffer->end(), input, input + length); in appendBuffer()
40 virtual void OnStdout(const char* buffer, int length);
41 virtual void OnStderr(const char* buffer, int length);
61 void DeployAgentBufferCallback::OnStdout(const char* buffer, int length) { in OnStdout() argument
62 appendBuffer(mpOutBuffer, buffer, length); in OnStdout()
65 void DeployAgentBufferCallback::OnStderr(const char* buffer, int length) { in OnStderr() argument
66 appendBuffer(mpErrBuffer, buffer, length); in OnStderr()
Dcommandline.h34 virtual void OnStdout(const char* buffer, int length) = 0;
37 virtual void OnStderr(const char* buffer, int length) = 0;
47 static void OnStream(std::string* string, FILE* stream, const char* buffer, int length) { in OnStream() argument
49 string->append(buffer, length); in OnStream()
51 fwrite(buffer, 1, length, stream); in OnStream()
71 void OnStdout(const char* buffer, int length) { in OnStdout() argument
72 OnStream(stdout_str_, stdout, buffer, length); in OnStdout()
75 void OnStderr(const char* buffer, int length) { in OnStderr() argument
76 OnStream(stderr_str_, stderr, buffer, length); in OnStderr()
/system/bt/btif/src/
Dbtif_debug_btsnoop.cc50 size_t length);
53 const size_t length, const uint64_t timestamp_us) { in btsnoop_cb() argument
56 size_t included_length = btsnoop_calculate_packet_length(type, data, length); in btsnoop_cb()
66 ringbuffer_delete(buffer, header.length - 1); in btsnoop_cb()
71 header.length = included_length + 1; // +1 for type byte in btsnoop_cb()
72 header.packet_length = length + 1; // +1 for type byte. in btsnoop_cb()
83 size_t length) { in btsnoop_calculate_packet_length() argument
98 return length; in btsnoop_calculate_packet_length()
101 return length; in btsnoop_calculate_packet_length()
107 if (length > len_hci_acl) { in btsnoop_calculate_packet_length()
[all …]
/system/bt/tools/scripts/
Dbtsnooz.py96 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
97 offset += 7 + length - 1
103 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
106 sys.stdout.write(struct.pack('>II', length, length))
110 sys.stdout.write(decompressed[offset:offset + length - 1])
111 offset += length - 1
123length, packet_length, delta_time_ms, snooz_type = struct.unpack_from('=HHIb', decompressed, offse…
124 offset += 9 + length - 1
130length, packet_length, delta_time_ms, snooz_type = struct.unpack_from('=HHIb', decompressed, offse…
133 sys.stdout.write(struct.pack('>II', packet_length, length))
[all …]
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_messages.h43 length = 0; in SizedBuffer()
46 if (buffer && length > 0) { in ~SizedBuffer()
47 memset_s(buffer.get(), 0, length); in ~SizedBuffer()
57 length = 0; in SizedBuffer()
60 length = len; in SizedBuffer()
64 SizedBuffer(SizedBuffer && rhs) : buffer(move(rhs.buffer)), length(rhs.length) { in SizedBuffer()
65 rhs.length = 0; in SizedBuffer()
71 length = rhs.length;
72 rhs.length = 0;
81 uint32_t size() const { return buffer ? length : 0; } in size()
[all …]
/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/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/gatekeeper/
Dgatekeeper_messages.cpp44 uint32_t length = to_append.size(); in append_to_buffer() local
45 memcpy(*buffer, &length, sizeof(length)); in append_to_buffer()
46 *buffer += sizeof(length); in append_to_buffer()
47 if (length != 0 && to_append.Data<uint8_t>() != nullptr) { in append_to_buffer()
48 memcpy(*buffer, to_append.Data<uint8_t>(), length); in append_to_buffer()
49 *buffer += length; in append_to_buffer()
59 uint32_t length; in read_from_buffer() local
60 memcpy(&length, *buffer, sizeof(length)); in read_from_buffer()
62 *buffer += sizeof(length); in read_from_buffer()
64 if (length == 0) { in read_from_buffer()
[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/core/liblog/
Dpmsg_writer.cpp177 size_t length, packet_len; in __android_log_pmsg_file_write() local
208 length = strlen(tag) + 1; in __android_log_pmsg_file_write()
209 packet_len = LOGGER_ENTRY_MAX_PAYLOAD - sizeof(char) - length; in __android_log_pmsg_file_write()
214 vec[1].iov_len = length; in __android_log_pmsg_file_write()
216 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write()
221 len -= length; in __android_log_pmsg_file_write()
225 transfer = length; in __android_log_pmsg_file_write()
228 if ((transfer < length) && (buf[transfer] == '\n')) { in __android_log_pmsg_file_write()
240 return ret ? ret : (len - length); in __android_log_pmsg_file_write()
242 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()
161 memcmp(addr, &entry->addr, entry->length) == 0) in interop_match_dynamic_()
178 interop_addr_database[i].length) == 0) { in interop_match_fixed_()
/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/libbase/
Dmapped_file.cpp38 std::unique_ptr<MappedFile> MappedFile::FromFd(borrowed_fd fd, off64_t offset, size_t length, in FromFd() argument
41 return FromOsHandle(reinterpret_cast<HANDLE>(_get_osfhandle(fd.get())), offset, length, prot); in FromFd()
43 return FromOsHandle(fd.get(), offset, length, prot); in FromFd()
47 std::unique_ptr<MappedFile> MappedFile::FromOsHandle(os_handle h, off64_t offset, size_t length, in FromOsHandle() argument
52 off64_t file_length = length + slop; in FromOsHandle()
60 if (length == 0 && ::GetLastError() == ERROR_FILE_INVALID) { in FromOsHandle()
73 new MappedFile(static_cast<char*>(base), length, slop, handle)); in FromOsHandle()
79 if (errno == EINVAL && length == 0) { in FromOsHandle()
84 return std::unique_ptr<MappedFile>(new MappedFile(static_cast<char*>(base), length, slop)); in FromOsHandle()
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dhci_protocol.cc29 size_t HciProtocol::WriteSafely(int fd, const uint8_t* data, size_t length) { in WriteSafely() argument
31 while (length > 0) { in WriteSafely()
32 ssize_t ret = TEMP_FAILURE_RETRY(write(fd, data + transmitted_length, length)); in WriteSafely()
46 length -= ret; in WriteSafely()

12345678910>>...21