Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 100) sorted by relevance

1234

/system/utest/crypto/
A Dbytes.cpp38 Bytes bytes; in TestRandomize() local
51 Bytes bytes; in TestResize() local
54 EXPECT_NONNULL(bytes.get()); in TestResize()
60 EXPECT_NONNULL(bytes.get()); in TestResize()
66 EXPECT_NONNULL(bytes.get()); in TestResize()
80 EXPECT_OK(bytes.Resize(0)); in TestResize()
81 EXPECT_EQ(bytes.len(), 0U); in TestResize()
82 EXPECT_NULL(bytes.get()); in TestResize()
88 Bytes bytes, copy; in TestCopy() local
124 Bytes bytes; in TestArrayAccess() local
[all …]
/system/ulib/pretty/
A Dsizes.c29 size_t orig_bytes = bytes; in format_size_fixed()
45 : (bytes >= 10000 || (bytes != 0 && (bytes & 1023) == 0))) { in format_size_fixed()
54 bytes = orig_bytes; in format_size_fixed()
57 if (bytes & 1023) { in format_size_fixed()
60 r = bytes % 1024; in format_size_fixed()
61 bytes /= 1024; in format_size_fixed()
64 snprintf(str, str_size, "%zu%c", bytes, units[ui]); in format_size_fixed()
73 bytes++; in format_size_fixed()
76 snprintf(str, str_size, "%zu.%1u%c", bytes, r, units[ui]); in format_size_fixed()
81 char* format_size(char* str, size_t str_size, size_t bytes) { in format_size() argument
[all …]
/system/ulib/ddk/include/ddk/protocol/
A Dbt-gatt-svc-lib.h30 bt_gatt_uuid_t retval = {.bytes = BT_GATT_BASE_UUID}; in bt_gatt_make_uuid32()
32 retval.bytes[__BT_UUID_ASSIGNED_OFFSET] = (uint8_t)(value); in bt_gatt_make_uuid32()
33 retval.bytes[__BT_UUID_ASSIGNED_OFFSET + 1] = (uint8_t)(value >> 8); in bt_gatt_make_uuid32()
34 retval.bytes[__BT_UUID_ASSIGNED_OFFSET + 2] = (uint8_t)(value >> 16); in bt_gatt_make_uuid32()
35 retval.bytes[__BT_UUID_ASSIGNED_OFFSET + 3] = (uint8_t)(value >> 24); in bt_gatt_make_uuid32()
50 return memcmp(u1->bytes, u2->bytes, 16); in bt_gatt_compare_uuid()
/system/ulib/fs/
A Dhandler.cpp19 auto header = reinterpret_cast<fidl_message_header_t*>(msg->bytes); in Reply()
21 return zx_channel_write(connection->Channel(), 0, msg->bytes, msg->num_bytes, in Reply()
36 uint8_t bytes[ZXFIDL_MAX_MSG_BYTES]; in ReadMessage() local
39 .bytes = bytes, in ReadMessage()
45 zx_status_t r = zx_channel_read(h, 0, bytes, handles, countof(bytes), in ReadMessage()
57 auto header = reinterpret_cast<fidl_message_header_t*>(msg.bytes); in ReadMessage()
73 .bytes = &request, in CloseMessage()
/system/ulib/fidl/include/lib/fidl/llcpp/
A Ddecoded_message.h33 DecodedMessage(BytePart bytes) : in DecodedMessage() argument
34 bytes_(std::move(bytes)) { } in DecodedMessage()
52 void Reset(BytePart bytes) { in Reset() argument
54 bytes_ = std::move(bytes); in Reset()
66 msg->bytes().data(), msg->bytes().actual(), in DecodeFrom()
70 BytePart bytes = msg->ReleaseBytesAndHandles(); in DecodeFrom() local
72 Reset(std::move(bytes)); in DecodeFrom()
A Dencoded_message.h63 EncodedMessage(BytePart bytes) : in EncodedMessage() argument
64 bytes_(std::move(bytes)) { } in EncodedMessage()
80 const BytePart& bytes() const { return bytes_; } in bytes() function
/system/ulib/fidl/
A Dhandle_closing.cpp28 FidlHandleCloser(const fidl_type_t* type, void* bytes, uint32_t num_bytes, in FidlHandleCloser() argument
30 : Super(type), bytes_(static_cast<uint8_t*>(bytes)), num_bytes_(num_bytes), in FidlHandleCloser()
37 uint8_t* bytes() const { return bytes_; } in bytes() function in __anon72d444530111::FidlHandleCloser
93 zx_status_t fidl_close_handles(const fidl_type_t* type, void* bytes, uint32_t num_bytes, in fidl_close_handles() argument
96 FidlHandleCloser handle_closer(type, bytes, num_bytes, out_error_msg); in fidl_close_handles()
106 return fidl_close_handles(type, msg->bytes, msg->num_bytes, out_error_msg); in fidl_close_handles_msg()
A Dvalidating.cpp25 FidlValidator(const fidl_type_t* type, const void* bytes, uint32_t num_bytes, in FidlValidator() argument
27 : Super(type), bytes_(static_cast<const uint8_t*>(bytes)), num_bytes_(num_bytes), in FidlValidator()
38 const uint8_t* bytes() const { return bytes_; } in bytes() function in __anon8c8a5ffc0111::FidlValidator
79 zx_status_t fidl_validate(const fidl_type_t* type, const void* bytes, uint32_t num_bytes, in fidl_validate() argument
81 FidlValidator validator(type, bytes, num_bytes, num_handles, out_error_msg); in fidl_validate()
88 return fidl_validate(type, msg->bytes, msg->num_bytes, msg->num_handles, in fidl_validate_msg()
A Ddecoding.cpp29 FidlDecoder(const fidl_type_t* type, void* bytes, uint32_t num_bytes, in FidlDecoder() argument
31 : Super(type), bytes_(static_cast<uint8_t*>(bytes)), num_bytes_(num_bytes), in FidlDecoder()
45 uint8_t* bytes() const { return bytes_; } in bytes() function in __anone0b8cab60111::FidlDecoder
103 zx_status_t fidl_decode(const fidl_type_t* type, void* bytes, uint32_t num_bytes, in fidl_decode() argument
106 FidlDecoder decoder(type, bytes, num_bytes, handles, num_handles, out_error_msg); in fidl_decode()
113 return fidl_decode(type, msg->bytes, msg->num_bytes, msg->handles, in fidl_decode_msg()
A Dencoding.cpp31 FidlEncoder(const fidl_type_t* type, void* bytes, uint32_t num_bytes, zx_handle_t* handles, in FidlEncoder() argument
33 : Super(type), bytes_(static_cast<uint8_t*>(bytes)), num_bytes_(num_bytes), in FidlEncoder()
52 uint8_t* bytes() const { return bytes_; } in bytes() function in __anonc1ee87600111::FidlEncoder
121 zx_status_t fidl_encode(const fidl_type_t* type, void* bytes, uint32_t num_bytes, in fidl_encode() argument
124 FidlEncoder encoder(type, bytes, num_bytes, handles, max_handles, out_actual_handles, in fidl_encode()
132 return fidl_encode(type, msg->bytes, msg->num_bytes, msg->handles, msg->num_handles, in fidl_encode_msg()
A Dmessage_buffer.cpp42 return Message(BytePart(bytes(), bytes_capacity()), in CreateEmptyMessage()
47 return Builder(bytes(), bytes_capacity()); in CreateBuilder()
/system/ulib/zx/include/lib/zx/
A Dchannel.h34 zx_status_t read(uint32_t flags, void* bytes, uint32_t num_bytes, in read() argument
37 return zx_channel_read(get(), flags, bytes, handles, num_bytes, in read()
41 zx_status_t read_etc(uint32_t flags, void* bytes, uint32_t num_bytes, in read_etc() argument
44 return zx_channel_read_etc(get(), flags, bytes, handles, num_bytes, in read_etc()
48 zx_status_t write(uint32_t flags, const void* bytes, uint32_t num_bytes, in write() argument
50 return zx_channel_write(get(), flags, bytes, num_bytes, handles, in write()
/system/dev/audio/intel-hda/dsp/
A Ddebug.cpp87 size_t bytes = 0; in DumpFirmwareConfig() local
88 while (bytes < length) { in DumpFirmwareConfig()
89 if (length - bytes <= sizeof(*config)) { in DumpFirmwareConfig()
98 if ((cfg->length + sizeof(*cfg)) > (bytes - length)) { in DumpFirmwareConfig()
220 bytes += sizeof(*cfg) + cfg->length; in DumpFirmwareConfig()
226 size_t bytes = 0; in DumpHardwareConfig() local
227 while (bytes < length) { in DumpHardwareConfig()
228 if (length - bytes <= sizeof(*config)) { in DumpHardwareConfig()
237 if ((cfg->length + sizeof(*cfg)) > (bytes - length)) { in DumpHardwareConfig()
263 LOG(INFO, " mem_page_bytes: %u\n", *bytes); in DumpHardwareConfig()
[all …]
/system/ulib/fidl/include/lib/fidl/
A Dcoding.h20 zx_status_t fidl_encode(const fidl_type_t* type, void* bytes, uint32_t num_bytes,
27 zx_status_t fidl_decode(const fidl_type_t* type, void* bytes, uint32_t num_bytes,
36 zx_status_t fidl_validate(const fidl_type_t* type, const void* bytes, uint32_t num_bytes,
45 zx_status_t fidl_close_handles(const fidl_type_t* type, void* bytes, uint32_t num_bytes,
/system/ulib/runtime/
A Dprocessargs.c60 static zx_status_t unpack_strings(char* buffer, uint32_t bytes, char* result[], in unpack_strings() argument
66 if (p >= &buffer[bytes]) in unpack_strings()
74 zx_status_t zxr_processargs_strings(void* msg, uint32_t bytes, in zxr_processargs_strings() argument
79 status = unpack_strings(msg, bytes, argv, pa->args_off, pa->args_num); in zxr_processargs_strings()
82 status = unpack_strings(msg, bytes, envp, in zxr_processargs_strings()
86 status = unpack_strings(msg, bytes, names, pa->names_off, pa->names_num); in zxr_processargs_strings()
/system/ulib/fidl/include/lib/fidl/cpp/
A Dmessage.h31 Message(BytePart bytes, HandlePart handles);
95 BytePart& bytes() { return bytes_; } in bytes() function
96 const BytePart& bytes() const { return bytes_; } in bytes() function
97 void set_bytes(BytePart bytes) { bytes_ = static_cast<BytePart&&>(bytes); } in set_bytes() argument
/system/ulib/fidl-async/
A Dbind.c32 fidl_message_header_t* hdr = (fidl_message_header_t*)msg->bytes; in fidl_reply()
35 return zx_channel_write(conn->channel, 0, msg->bytes, msg->num_bytes, in fidl_reply()
54 char bytes[ZX_CHANNEL_MAX_MSG_BYTES]; in fidl_message_handler() local
58 .bytes = bytes, in fidl_message_handler()
63 status = zx_channel_read(wait->object, 0, bytes, handles, in fidl_message_handler()
73 fidl_message_header_t* hdr = (fidl_message_header_t*)msg.bytes; in fidl_message_handler()
/system/ulib/pretty/include/pretty/
A Dsizes.h38 char* format_size_fixed(char* str, size_t str_size, size_t bytes, char unit);
41 char* format_size(char* str, size_t str_size, size_t bytes);
/system/utest/fidl-simple/
A Dspaceship.fidl9 // StarData is 16 bytes, all inline.
14 // PlanetData is 4 bytes, all inline.
19 // AstrologicalData is 20 bytes long, i.e. tag of 4 bytes + max(4, 16).
A Dfakesocket_tests.cpp35 return fidl_socket_write_control(conn->socket, msg->bytes, msg->num_bytes); in fidl_socket_reply()
53 char bytes[1024]; in fidl_socket_message_handler() local
56 .bytes = bytes, in fidl_socket_message_handler()
62 status = fidl_socket_read_control(wait->object, msg.bytes, in fidl_socket_message_handler()
63 sizeof(bytes), &actual); in fidl_socket_message_handler()
A Dldsvc_tests.c88 fidl_message_header_t* hdr = (fidl_message_header_t*)msg->bytes; in ldsvc_server_reply()
92 return zx_channel_write(conn->channel, 0, msg->bytes, msg->num_bytes, in ldsvc_server_reply()
112 char bytes[ZX_CHANNEL_MAX_MSG_BYTES]; in ldsvc_server() local
115 .bytes = bytes, in ldsvc_server()
120 status = zx_channel_read(conn.channel, 0, bytes, handles, in ldsvc_server()
126 fidl_message_header_t* hdr = (fidl_message_header_t*)msg.bytes; in ldsvc_server()
/system/utest/libfzl/
A Downed-vmo-mapper-tests.cpp231 uint8_t bytes[ZX_PAGE_SIZE]; in ReadTest() local
232 memset(bytes, 0xff, ZX_PAGE_SIZE); in ReadTest()
234 zx_status_t status = mapper->vmo().read(bytes, 0, ZX_PAGE_SIZE); in ReadTest()
237 ASSERT_EQ(bytes[i], 0); in ReadTest()
254 uint8_t bytes[ZX_PAGE_SIZE] = {}; in WriteMappingTest() local
255 zx_status_t status = mapper->vmo().read(bytes, 0, ZX_PAGE_SIZE); in WriteMappingTest()
258 ASSERT_EQ(bytes[i], 0xff); in WriteMappingTest()
272 uint8_t bytes[ZX_PAGE_SIZE]; in ReadMappingTest() local
273 memset(bytes, 0xff, ZX_PAGE_SIZE); in ReadMappingTest()
274 zx_status_t status = mapper->vmo().write(bytes, 0, ZX_PAGE_SIZE); in ReadMappingTest()
/system/dev/bus/virtio/
A Dblock.cpp288 zx_status_t BlockDevice::QueueTxn(block_txn_t* txn, uint32_t type, size_t bytes, zx_paddr_t* pages, in QueueTxn() argument
343 desc->len = (uint32_t)((bytes > PAGE_SIZE) ? PAGE_SIZE : bytes); in QueueTxn()
365 bytes -= desc->len; in QueueTxn()
368 assert(bytes == 0); in QueueTxn()
381 static zx_status_t pin_pages(zx_handle_t bti, block_txn_t* txn, size_t bytes, zx_paddr_t* pages, in pin_pages() argument
385 size_t pin_size = ROUNDUP(suboffset + bytes, PAGE_SIZE); in pin_pages()
462 size_t bytes; in WorkerThread() local
469 bytes = 0; in WorkerThread()
479 bytes = txn->op.rw.length * config_.blk_size; in WorkerThread()
480 status = pin_pages(bti_.get(), txn, bytes, pages, &num_pages); in WorkerThread()
[all …]
/system/banjo/zircon-device-nand/
A Dnand.banjo9 /// Read/write unit size, in bytes.
17 /// Available out of band bytes per page.
/system/core/devmgr/shared/
A Dfidl_txn.h26 auto hdr = static_cast<fidl_message_header_t*>(msg->bytes); in Reply()
28 return channel_->write(0, msg->bytes, msg->num_bytes, in Reply()

Completed in 854 milliseconds

1234