/system/extras/libfec/ |
D | fec_read.cpp | 67 static inline bool is_erasure(fec_handle *f, uint64_t offset, in is_erasure() argument 70 if (unlikely(offset >= f->data_size)) { in is_erasure() 78 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure() 85 static inline bool is_zero(fec_handle *f, uint64_t offset) in is_zero() argument 89 if (!v->hash || unlikely(offset >= f->data_size)) { in is_zero() 93 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero() 105 static int __ecc_read(fec_handle *f, void *rs, uint8_t *dest, uint64_t offset, in __ecc_read() argument 108 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read() 113 uint64_t rsb = offset - (offset / (e->rounds * FEC_BLOCKSIZE)) * in __ecc_read() 126 if (interleaved == offset) { in __ecc_read() [all …]
|
D | fec_open.cpp | 43 static int find_offset(uint64_t file_size, int roots, uint64_t *offset, in find_offset() argument 46 check(offset); in find_offset() 70 *offset = mi; in find_offset() 89 static int find_verity_offset(fec_handle *f, uint64_t *offset) in find_verity_offset() argument 92 check(offset); in find_verity_offset() 94 return find_offset(f->data_size, 0, offset, get_verity_size, in find_verity_offset() 99 static int parse_ecc_header(fec_handle *f, uint64_t offset) in parse_ecc_header() argument 105 debug("offset = %" PRIu64, offset); in parse_ecc_header() 107 if (offset > f->size - sizeof(fec_header)) { in parse_ecc_header() 115 if (!raw_pread(f, &header, sizeof(fec_header), offset)) { in parse_ecc_header() [all …]
|
D | fec_process.cpp | 24 uint64_t offset; member 35 debug("thread %d: [%" PRIu64 ", %" PRIu64 ")", p->id, p->offset, in __process() 36 p->offset + p->count); in __process() 38 p->rc = p->func(p->f, p->buf, p->count, p->offset, &p->errors); in __process() 43 ssize_t process(fec_handle *f, uint8_t *buf, size_t count, uint64_t offset, in process() argument 62 uint64_t start = (offset / FEC_BLOCKSIZE) * FEC_BLOCKSIZE; in process() 71 uint64_t pos = offset; in process() 87 info[i].buf = &buf[pos - offset]; in process() 89 info[i].offset = pos; in process()
|
/system/bt/tools/scripts/ |
D | btsnooz.py | 96 offset = 0 97 while offset < len(decompressed): 98 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset) 99 offset += 7 + length - 1 103 offset = 0 104 while offset < len(decompressed): 105 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset) 107 offset += 7 112 sys.stdout.write(decompressed[offset : offset + length - 1]) 113 offset += length - 1 [all …]
|
/system/core/libcutils/ |
D | open_memstream.c | 71 size_t offset; /* current write offset */ member 86 DBUG(("+++ ensureCap off=%d size=%d\n", stream->offset, writeSize)); in ensureCapacity() 88 size_t neededSize = stream->offset + writeSize + 1; in ensureCapacity() 129 if (stream->eof < stream->offset) { in write_memstream() 131 stream->eof, stream->offset-1)); in write_memstream() 133 stream->offset - stream->eof); in write_memstream() 137 memcpy(*stream->bufp + stream->offset, buf, size); in write_memstream() 138 stream->offset += size; in write_memstream() 140 if (stream->offset > stream->eof) { in write_memstream() 142 DBUG(("+++ EOF advanced to %d, appending nul\n", stream->offset)); in write_memstream() [all …]
|
/system/extras/perfprofd/quipper/ |
D | perf_reader.h | 180 bool ReadAttr(const ConstBufferWithSize& data, size_t* offset); 181 bool ReadEventAttr(const ConstBufferWithSize& data, size_t* offset, 184 size_t* offset, std::vector<u64>* ids); 187 bool ReadEventType(const ConstBufferWithSize& data, size_t* offset); 194 size_t offset, size_t size); 196 size_t offset, size_t size); 198 size_t offset, size_t size); 200 size_t offset, size_t size); 202 size_t offset, size_t size); 204 size_t offset, size_t size); [all …]
|
D | perf_reader.cc | 230 size_t* offset, in ReadStringFromBuffer() argument 233 offset, &dest->len)) { in ReadStringFromBuffer() 239 if (buffer.size < *offset + dest->len) { in ReadStringFromBuffer() 243 dest->str = string(buffer.ptr + *offset); in ReadStringFromBuffer() 244 *offset += dest->len / sizeof(*buffer.ptr); in ReadStringFromBuffer() 793 uint64_t offset = GetPerfSampleDataOffset(event); in ReadPerfSampleInfo() local 796 reinterpret_cast<const uint64_t*>(&event) + offset / sizeof(uint64_t), in ReadPerfSampleInfo() 802 size_t expected_size = event.header.size - offset; in ReadPerfSampleInfo() 822 uint64_t offset = GetPerfSampleDataOffset(*event); in WritePerfSampleInfo() local 824 size_t expected_size = event->header.size - offset; in WritePerfSampleInfo() [all …]
|
D | perf_utils.cc | 116 uint64_t offset = kuint64max; in GetPerfSampleDataOffset() local 119 offset = offsetof(event_t, sample.array); in GetPerfSampleDataOffset() 122 offset = sizeof(event.mmap) - sizeof(event.mmap.filename) + in GetPerfSampleDataOffset() 127 offset = sizeof(event.fork); in GetPerfSampleDataOffset() 130 offset = sizeof(event.comm) - sizeof(event.comm.comm) + in GetPerfSampleDataOffset() 134 offset = sizeof(event.lost); in GetPerfSampleDataOffset() 137 offset = sizeof(event.read); in GetPerfSampleDataOffset() 140 offset = sizeof(event.mmap2) - sizeof(event.mmap2.filename) + in GetPerfSampleDataOffset() 148 CHECK_NE(offset, kuint64max); in GetPerfSampleDataOffset() 149 CHECK_EQ(offset % sizeof(uint64_t), 0U); in GetPerfSampleDataOffset() [all …]
|
/system/bt/stack/gatt/ |
D | att_protocol.c | 58 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 79 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() 113 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_err_cmd() 135 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_browse_cmd() 163 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_read_by_type_value_cmd() 197 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_read_multi_cmd() 218 BT_HDR *attp_build_handle_cmd(UINT8 op_code, UINT16 handle, UINT16 offset) in attp_build_handle_cmd() argument 225 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_handle_cmd() 234 UINT16_TO_STREAM (p, offset); in attp_build_handle_cmd() 257 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_opcode_cmd() [all …]
|
/system/extras/zram-perf/ |
D | zram-perf.cpp | 66 for (uint64_t offset = 0; offset < devSize; offset += page_size) { in fillWithCompressible() local 82 for (uint64_t offset = 0; offset < devSize; offset += page_size) { in benchSequentialRead() local 83 if (offset == 0) in benchSequentialRead() 84 lseek(m_fd, offset, SEEK_SET); in benchSequentialRead() 103 for (uint64_t offset = 0; offset < devSize; offset += page_size) { in benchSequentialWrite() local 105 if (offset == 0) in benchSequentialWrite() 106 lseek(m_fd, offset, SEEK_SET); in benchSequentialWrite()
|
/system/core/libpixelflinger/codeflinger/ |
D | ARMAssemblerInterface.cpp | 54 uint32_t offset = abs(immed8); in __immed8_pre() local 61 ((W&1)<<21) | (((offset&0xF0)<<4)|(offset&0xF)); in __immed8_pre() 69 int Rn, uint32_t offset) in ADDR_LDR() argument 71 LDR(cc, Rd, Rn, offset); in ADDR_LDR() 74 int Rn, uint32_t offset) in ADDR_STR() argument 76 STR(cc, Rd, Rn, offset); in ADDR_STR()
|
D | ARMAssembler.cpp | 176 int32_t offset = int32_t(target_pc - (bt.pc+2)); in generate() local 177 *bt.pc |= offset & 0xFFFFFF; in generate() 278 int32_t offset = int32_t(pc - (mPC+2)); in B() local 279 *mPC++ = (cc<<28) | (0xA<<24) | (offset & 0xFFFFFF); in B() 284 int32_t offset = int32_t(pc - (mPC+2)); in BL() local 285 *mPC++ = (cc<<28) | (0xB<<24) | (offset & 0xFFFFFF); in BL() 299 void ARMAssembler::LDR(int cc, int Rd, int Rn, uint32_t offset) { in LDR() argument 300 *mPC++ = (cc<<28) | (1<<26) | (1<<20) | (Rn<<16) | (Rd<<12) | offset; in LDR() 302 void ARMAssembler::LDRB(int cc, int Rd, int Rn, uint32_t offset) { in LDRB() argument 303 *mPC++ = (cc<<28) | (1<<26) | (1<<22) | (1<<20) | (Rn<<16) | (Rd<<12) | offset; in LDRB() [all …]
|
D | ARMAssemblerProxy.cpp | 212 void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) { in LDR() argument 213 mTarget->LDR(cc, Rd, Rn, offset); in LDR() 215 void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) { in LDRB() argument 216 mTarget->LDRB(cc, Rd, Rn, offset); in LDRB() 218 void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) { in STR() argument 219 mTarget->STR(cc, Rd, Rn, offset); in STR() 221 void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) { in STRB() argument 222 mTarget->STRB(cc, Rd, Rn, offset); in STRB() 224 void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) { in LDRH() argument 225 mTarget->LDRH(cc, Rd, Rn, offset); in LDRH() [all …]
|
/system/bt/bta/hf_client/ |
D | bta_hf_client_at.c | 635 int offset; in bta_hf_client_parse_uint32() local 637 res = sscanf(buffer, "%u%n", &value, &offset); in bta_hf_client_parse_uint32() 643 buffer += offset; in bta_hf_client_parse_uint32() 664 int offset; in bta_hf_client_parse_cind_values() local 667 while((res = sscanf(buffer, "%u%n", &value, &offset)) > 0) in bta_hf_client_parse_cind_values() 672 buffer += offset; in bta_hf_client_parse_cind_values() 695 int offset = 0; in bta_hf_client_parse_cind_list() local 701 while ((res = sscanf(buffer, "(\"%128[^\"]\",(%u%*[-,]%u))%n", name, &min, &max, &offset)) > 2) in bta_hf_client_parse_cind_list() 704 if (offset == 0) in bta_hf_client_parse_cind_list() 710 buffer += offset; in bta_hf_client_parse_cind_list() [all …]
|
/system/update_engine/common/ |
D | multi_range_http_fetcher.h | 60 void AddRange(off_t offset, size_t size) { in AddRange() argument 62 ranges_.push_back(Range(offset, size)); in AddRange() 65 void AddRange(off_t offset) { in AddRange() argument 66 ranges_.push_back(Range(offset)); in AddRange() 70 void SetOffset(off_t offset) override {} // for now, doesn't support this in SetOffset() argument 127 Range(off_t offset, size_t length) : offset_(offset), length_(length) {} in Range() argument 128 explicit Range(off_t offset) : offset_(offset), length_(0) {} in Range() argument 130 inline off_t offset() const { return offset_; } in offset() function
|
/system/extras/f2fs_utils/ |
D | f2fs_ioutils.c | 97 static int dev_write_fd(void *buf, __u64 offset, size_t len) in dev_write_fd() argument 99 if (lseek64(config.fd, (off64_t)offset, SEEK_SET) < 0) in dev_write_fd() 153 int dev_read_version(void *buf, __u64 offset, size_t len) in dev_read_version() argument 158 int dev_read(void *buf, __u64 offset, size_t len) in dev_read() argument 163 int dev_write(void *buf, __u64 offset, size_t len) in dev_write() argument 166 return dev_write_fd(buf, offset, len); in dev_write() 168 return dev_write_sparse(buf, offset, len); in dev_write() 173 int dev_fill(void *buf, __u64 offset, size_t len) in dev_fill() argument 177 return dev_write_fd(buf, offset, len); in dev_fill()
|
/system/core/include/utils/ |
D | Compat.h | 28 static inline off64_t lseek64(int fd, off64_t offset, int whence) { in lseek64() argument 29 return lseek(fd, offset, whence); in lseek64() 32 static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) { in pread64() argument 33 return pread(fd, buf, nbytes, offset); in pread64() 36 static inline ssize_t pwrite64(int fd, const void* buf, size_t nbytes, off64_t offset) { in pwrite64() argument 37 return pwrite(fd, buf, nbytes, offset); in pwrite64()
|
/system/extras/libpagemap/ |
D | pm_memusage.c | 86 void pm_memusage_pswap_add_offset(pm_memusage_t *mu, unsigned int offset) { in pm_memusage_pswap_add_offset() argument 92 if (offset > mu->p_swap->array_size) { in pm_memusage_pswap_add_offset() 93 fprintf(stderr, "SWAP offset %d is out of swap bounds.\n", offset); in pm_memusage_pswap_add_offset() 96 if (mu->p_swap->offset_array[offset] == USHRT_MAX) { in pm_memusage_pswap_add_offset() 97 fprintf(stderr, "SWAP offset %d ref. count if overflowing ushort type.\n", offset); in pm_memusage_pswap_add_offset() 99 mu->p_swap->offset_array[offset]++; in pm_memusage_pswap_add_offset() 105 soff->offset = offset; in pm_memusage_pswap_add_offset() 120 su->proportional += pagesize / mu->p_swap->offset_array[elem->offset]; in pm_memusage_pswap_get_usage() 121 su->unique += mu->p_swap->offset_array[elem->offset] == 1 ? pagesize : 0; in pm_memusage_pswap_get_usage()
|
/system/bt/stack/avrc/ |
D | avrc_api.c | 104 return (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_get_data_ptr() 119 const int offset = MAX(AVCT_MSG_OFFSET, p_pkt->offset); in avrc_copy_packet() local 121 BT_HDR *p_pkt_copy = (BT_HDR *)osi_malloc(BT_HDR_SIZE + offset + pkt_len); in avrc_copy_packet() 125 p_pkt_copy->offset = offset; in avrc_copy_packet() 156 p_orig_data = ((UINT8 *)(p_fcb->p_fmsg + 1) + p_fcb->p_fmsg->offset); in avrc_prep_end_frag() 161 p_pkt_new->offset += (AVRC_MAX_CTRL_DATA_LEN - AVRC_VENDOR_HDR_SIZE - AVRC_MIN_META_HDR_SIZE); in avrc_prep_end_frag() 162 p_data = (UINT8 *)(p_pkt_new+1) + p_pkt_new->offset; in avrc_prep_end_frag() 196 int offset_len = MAX(AVCT_MSG_OFFSET, p_pkt->offset); in avrc_send_continue_frag() 200 p_pkt->offset = AVCT_MSG_OFFSET; in avrc_send_continue_frag() 203 p_old = (UINT8 *)(p_pkt_old + 1) + p_pkt_old->offset; in avrc_send_continue_frag() [all …]
|
D | avrc_opt.c | 62 p_cmd->offset = AVCT_MSG_OFFSET; in avrc_vendor_msg() 63 p_data = (UINT8 *)(p_cmd + 1) + p_cmd->offset; in avrc_vendor_msg() 70 p_cmd->len = (UINT16)(p_data + p_msg->vendor_len - (UINT8 *)(p_cmd + 1) - p_cmd->offset); in avrc_vendor_msg() 102 p_cmd->offset = AVCT_MSG_OFFSET; in AVRC_UnitCmd() 103 p_data = (UINT8 *)(p_cmd + 1) + p_cmd->offset; in AVRC_UnitCmd() 109 p_cmd->len = p_data + AVRC_UNIT_OPRND_BYTES - (UINT8 *)(p_cmd + 1) - p_cmd->offset; in AVRC_UnitCmd() 145 p_cmd->offset = AVCT_MSG_OFFSET; in AVRC_SubCmd() 146 p_data = (UINT8 *)(p_cmd + 1) + p_cmd->offset; in AVRC_SubCmd() 153 p_cmd->len = p_data + AVRC_SUB_OPRND_BYTES - (UINT8 *)(p_cmd + 1) - p_cmd->offset; in AVRC_SubCmd()
|
D | avrc_bld_ct.c | 48 p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_next_cmd() 80 p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_set_abs_volume_cmd() 106 p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_register_notifn() 130 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_get_capability_cmd() 152 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_list_player_app_attr_cmd() 173 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_list_player_app_values_cmd() 196 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_get_current_player_app_values_cmd() 223 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_set_current_player_app_values_cmd() 255 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_get_player_app_setting_attr_text_cmd() 284 UINT8 *p_start = (UINT8 *)(p_pkt + 1) + p_pkt->offset; in avrc_bld_get_player_app_setting_value_text_cmd() [all …]
|
/system/bt/hci/src/ |
D | packet_fragmenter.c | 70 uint8_t *stream = packet->data + packet->offset; in fragment_and_dispatch() 92 stream = packet->data + packet->offset; in fragment_and_dispatch() 99 packet->offset += max_data_size; in fragment_and_dispatch() 104 stream = packet->data + packet->offset; in fragment_and_dispatch() 181 partial_packet->offset = packet->len; in reassemble_and_dispatch() 200 packet->offset = HCI_ACL_PREAMBLE_SIZE; in reassemble_and_dispatch() 201 uint16_t projected_offset = partial_packet->offset + (packet->len - HCI_ACL_PREAMBLE_SIZE); in reassemble_and_dispatch() 204 packet->len = partial_packet->len - partial_packet->offset; in reassemble_and_dispatch() 209 partial_packet->data + partial_packet->offset, in reassemble_and_dispatch() 210 packet->data + packet->offset, in reassemble_and_dispatch() [all …]
|
/system/bt/stack/hcic/ |
D | hcicmds.c | 44 p->offset = 0; in btsnd_hcic_inquiry() 63 p->offset = 0; in btsnd_hcic_inq_cancel() 78 p->offset = 0; in btsnd_hcic_per_inq_mode() 99 p->offset = 0; in btsnd_hcic_exit_per_inq() 120 p->offset = 0; in btsnd_hcic_create_conn() 146 p->offset = 0; in btsnd_hcic_disconnect() 164 p->offset = 0; in btsnd_hcic_add_SCO_conn() 183 p->offset = 0; in btsnd_hcic_create_conn_cancel() 200 p->offset = 0; in btsnd_hcic_accept_conn() 218 p->offset = 0; in btsnd_hcic_reject_conn() [all …]
|
/system/bt/stack/rfcomm/ |
D | rfc_ts_frames.c | 47 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_sabme() 76 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_ua() 105 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_dm() 134 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_disc() 163 p_buf->offset -= RFCOMM_CTRL_FRAME_LEN; in rfc_send_buf_uih() 165 p_buf->offset--; in rfc_send_buf_uih() 173 p_buf->offset--; in rfc_send_buf_uih() 175 p_data = (UINT8 *)(p_buf + 1) + p_buf->offset; in rfc_send_buf_uih() 198 p_data = (UINT8 *)(p_buf + 1) + p_buf->offset + p_buf->len++; in rfc_send_buf_uih() 200 *p_data = RFCOMM_UIH_FCS ((UINT8 *)(p_buf + 1) + p_buf->offset, dlci); in rfc_send_buf_uih() [all …]
|
/system/core/libdiskconfig/ |
D | diskutils.c | 34 write_raw_image(const char *dst, const char *src, loff_t offset, int test) in write_raw_image() argument 44 ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, (unsigned long long)offset); in write_raw_image() 56 if (lseek64(dst_fd, offset, SEEK_SET) != offset) { in write_raw_image() 57 ALOGE("Could not seek to offset %lld in %s.", (long long)offset, dst); in write_raw_image() 105 ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, (long long)offset); in write_raw_image()
|