Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 25 of 57) sorted by relevance

123

/Zephyr-latest/tests/lib/heap/src/
Dmain.c68 static size_t fill_token(void *p, size_t sz) in fill_token() argument
72 return (pi * sz) ^ ((sz ^ 0xea6d) * ((pi << 11) | (pi >> 21))); in fill_token()
80 static void fill_block(void *p, size_t sz) in fill_block() argument
86 size_t tok = fill_token(p, sz); in fill_block()
88 ((size_t *)p)[0] = sz; in fill_block()
90 if (sz >= 2 * sizeof(size_t)) { in fill_block()
94 if (sz > 3*sizeof(size_t)) { in fill_block()
95 ((size_t *)p)[sz / sizeof(size_t) - 1] = tok; in fill_block()
102 size_t sz = ((size_t *)p)[0]; in check_fill() local
103 size_t tok = fill_token(p, sz); in check_fill()
[all …]
/Zephyr-latest/lib/heap/
Dheap_stress.c25 size_t sz; member
129 size_t sz = rand_alloc_size(&sr); in sys_heap_stress() local
130 void *p = sr.alloc_fn(sr.arg, sz); in sys_heap_stress()
136 sr.blocks[sr.blocks_alloced].sz = sz; in sys_heap_stress()
138 sr.bytes_alloced += sz; in sys_heap_stress()
143 size_t sz = sr.blocks[b].sz; in sys_heap_stress() local
148 sr.bytes_alloced -= sz; in sys_heap_stress()
/Zephyr-latest/samples/subsys/debug/fuzz/src/
Dmain.c41 void check##nxt(const uint8_t *data, size_t sz); \
42 void __noinline check##cur(const uint8_t *data, size_t sz) \
44 if (cur < sz && data[cur] == key[cur]) { \
52 check##nxt(data, sz); \
108 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t sz) in LLVMFuzzerTestOneInput() argument
121 fuzz_sz = sz; in LLVMFuzzerTestOneInput()
/Zephyr-latest/soc/espressif/common/
Desp_heap_runtime.c53 size_t sz; in esp_heap_runtime_calloc() local
55 if (__builtin_mul_overflow(n, size, &sz)) { in esp_heap_runtime_calloc()
58 void *ptr = k_heap_alloc(&esp_heap_runtime, sz, K_NO_WAIT); in esp_heap_runtime_calloc()
61 memset(ptr, 0, sz); in esp_heap_runtime_calloc()
/Zephyr-latest/samples/net/sockets/echo_async_select/src/
Dsocket_echo_select.c22 #define READ(fd, buf, sz) read(fd, buf, sz) argument
23 #define WRITE(fd, buf, sz) write(fd, buf, sz) argument
33 #define READ(fd, buf, sz) recv(fd, buf, sz, 0) argument
34 #define WRITE(fd, buf, sz) send(fd, buf, sz, 0) argument
/Zephyr-latest/lib/posix/options/
Ddevice_io.c21 ssize_t zvfs_read(int fd, void *buf, size_t sz, size_t *from_offset);
22 ssize_t zvfs_write(int fd, const void *buf, size_t sz, size_t *from_offset);
114 ssize_t read(int fd, void *buf, size_t sz) in read() argument
116 return zvfs_read(fd, buf, sz, NULL); in read()
132 ssize_t write(int fd, const void *buf, size_t sz) in write() argument
134 return zvfs_write(fd, buf, sz, NULL); in write()
/Zephyr-latest/arch/x86/core/intel64/
Dcpu.c50 void arch_cpu_start(int cpu_num, k_thread_stack_t *stack, int sz, in arch_cpu_start() argument
74 x86_cpuboot[cpu_num].sp = (uint64_t) K_KERNEL_STACK_BUFFER(stack) + sz; in arch_cpu_start()
75 x86_cpuboot[cpu_num].stack_size = sz; in arch_cpu_start()
89 ARG_UNUSED(sz); in arch_cpu_start()
/Zephyr-latest/include/zephyr/sys/
Dspsc_lockfree.h82 #define SPSC_INITIALIZER(sz, buf) \ argument
90 .mask = sz - 1, \
114 #define SPSC_DEFINE(name, type, sz) \ argument
115 BUILD_ASSERT(IS_POWER_OF_TWO(sz)); \
116 static type __spsc_buf_##name[sz]; \
117 SPSC_DECLARE(name, type) name = SPSC_INITIALIZER(sz, __spsc_buf_##name);
Dfdtable.h60 ssize_t (*read)(void *obj, void *buf, size_t sz);
61 ssize_t (*read_offs)(void *obj, void *buf, size_t sz, size_t offset);
64 ssize_t (*write)(void *obj, const void *buf, size_t sz);
65 ssize_t (*write_offs)(void *obj, const void *buf, size_t sz, size_t offset);
/Zephyr-latest/subsys/net/lib/mqtt_sn/
Dmqtt_sn_encoder.c27 static int prepare_message(struct net_buf_simple *buf, size_t sz, enum mqtt_sn_msg_type type) in prepare_message() argument
30 sz++; in prepare_message()
32 sz += (sz > 254 ? 3 : 1); in prepare_message()
36 LOG_DBG("Preparing message of type %d with size %zu", type, sz); in prepare_message()
39 if (sz > UINT16_MAX) { in prepare_message()
40 LOG_ERR("Message of size %zu is too large for MQTT-SN", sz); in prepare_message()
44 if (sz > maxlen) { in prepare_message()
45 LOG_ERR("Message of size %zu does not fit in buffer of length %zu", sz, maxlen); in prepare_message()
49 if (sz <= 255) { in prepare_message()
50 net_buf_simple_add_u8(buf, (uint8_t)sz); in prepare_message()
[all …]
Dmqtt_sn_transport_udp.c148 static int tp_udp_sendto(struct mqtt_sn_client *client, void *buf, size_t sz, const void *dest_addr, in tp_udp_sendto() argument
157 LOG_HEXDUMP_DBG(buf, sz, "Sending Broadcast UDP packet"); in tp_udp_sendto()
173 rc = zsock_sendto(udp->sock, buf, sz, 0, &udp->bcaddr, udp->bcaddrlen); in tp_udp_sendto()
175 LOG_HEXDUMP_DBG(buf, sz, "Sending Addressed UDP packet"); in tp_udp_sendto()
176 rc = zsock_sendto(udp->sock, buf, sz, 0, dest_addr, addrlen); in tp_udp_sendto()
183 if (rc != sz) { in tp_udp_sendto()
/Zephyr-latest/tests/net/lib/mqtt_sn_client/src/
Dmqtt_sn_client.c43 static int msg_sendto(struct mqtt_sn_client *client, void *buf, size_t sz, const void *dest_addr, in msg_sendto() argument
47 msg_send_data.msg_sz = sz; in msg_sendto()
96 ssize_t sz; member
104 if (recvfrom_data.data && recvfrom_data.sz > 0 && length >= recvfrom_data.sz) { in tp_recvfrom()
105 memcpy(buffer, recvfrom_data.data, recvfrom_data.sz); in tp_recvfrom()
112 return recvfrom_data.sz; in tp_recvfrom()
117 return recvfrom_data.sz; in tp_poll()
142 static int input(struct mqtt_sn_client *client, void *buf, size_t sz, in input() argument
146 recvfrom_data.sz = sz; in input()
/Zephyr-latest/include/zephyr/arch/arm/mmu/
Darm_mmu.h67 #define MMU_REGION_FLAT_ENTRY(name, adr, sz, attrs) \ argument
68 MMU_REGION_ENTRY(name, adr, adr, sz, attrs)
/Zephyr-latest/arch/riscv/core/
Dsmp.c31 void arch_cpu_start(int cpu_num, k_thread_stack_t *stack, int sz, in arch_cpu_start() argument
37 riscv_cpu_sp = K_KERNEL_STACK_BUFFER(stack) + sz; in arch_cpu_start()
/Zephyr-latest/soc/intel/intel_adsp/common/
Dmultiprocessing.c123 void arch_cpu_start(int cpu_num, k_thread_stack_t *stack, int sz, in arch_cpu_start() argument
132 z_mp_stack_top = K_KERNEL_STACK_BUFFER(stack) + sz; in arch_cpu_start()
/Zephyr-latest/arch/xtensa/include/
Dxtensa_stack.h41 bool xtensa_is_outside_stack_bounds(uintptr_t addr, size_t sz, uint32_t ps);
/Zephyr-latest/lib/os/zvfs/
Dzvfs_eventfd.c28 static ssize_t zvfs_eventfd_rw_op(void *obj, void *buf, size_t sz,
162 static ssize_t zvfs_eventfd_read_op(void *obj, void *buf, size_t sz) in zvfs_eventfd_read_op() argument
164 return zvfs_eventfd_rw_op(obj, buf, sz, zvfs_eventfd_read_locked); in zvfs_eventfd_read_op()
167 static ssize_t zvfs_eventfd_write_op(void *obj, const void *buf, size_t sz) in zvfs_eventfd_write_op() argument
169 return zvfs_eventfd_rw_op(obj, (zvfs_eventfd_t *)buf, sz, zvfs_eventfd_write_locked); in zvfs_eventfd_write_op()
300 static ssize_t zvfs_eventfd_rw_op(void *obj, void *buf, size_t sz, in zvfs_eventfd_rw_op() argument
310 if (sz < sizeof(zvfs_eventfd_t)) { in zvfs_eventfd_rw_op()
/Zephyr-latest/lib/utils/
Drb.c82 int sz = 0; in find_and_stack() local
84 stack[sz] = tree->root; in find_and_stack()
85 ++sz; in find_and_stack()
87 while (stack[sz - 1] != node) { in find_and_stack()
88 uint8_t side = tree->lessthan_fn(node, stack[sz - 1]) ? 0U : 1U; in find_and_stack()
89 struct rbnode *ch = get_child(stack[sz - 1], side); in find_and_stack()
92 stack[sz] = ch; in find_and_stack()
93 ++sz; in find_and_stack()
99 return sz; in find_and_stack()
/Zephyr-latest/drivers/eeprom/
Deeprom_mchp_xec.c186 uint16_t sz; in eeprom_xec_data_write_32_bytes() local
189 sz = offset % XEC_EEPROM_PAGE_SIZE; in eeprom_xec_data_write_32_bytes()
192 if (sz != 0) { in eeprom_xec_data_write_32_bytes()
194 if ((sz + len) > XEC_EEPROM_PAGE_SIZE) { in eeprom_xec_data_write_32_bytes()
195 rem_bytes = (XEC_EEPROM_PAGE_SIZE - sz); in eeprom_xec_data_write_32_bytes()
/Zephyr-latest/tests/subsys/fs/multi-fs/src/
Dtest_common_file.c78 size_t sz = strlen(test_str); in test_file_read() local
90 brw = fs_read(filep, read_buff, sz); in test_file_read()
/Zephyr-latest/lib/os/
Dfdtable.c316 static ssize_t zvfs_rw(int fd, void *buf, size_t sz, bool is_write, const size_t *from_offset) in zvfs_rw() argument
347 res = fdtable[fd].vtable->write_offs(fdtable[fd].obj, buf, sz, *off); in zvfs_rw()
354 res = fdtable[fd].vtable->read_offs(fdtable[fd].obj, buf, sz, *off); in zvfs_rw()
371 ssize_t zvfs_read(int fd, void *buf, size_t sz, const size_t *from_offset) in zvfs_read() argument
373 return zvfs_rw(fd, buf, sz, false, from_offset); in zvfs_read()
376 ssize_t zvfs_write(int fd, const void *buf, size_t sz, const size_t *from_offset) in zvfs_write() argument
378 return zvfs_rw(fd, (void *)buf, sz, true, from_offset); in zvfs_write()
/Zephyr-latest/arch/arc/core/
Dsmp.c44 void arch_cpu_start(int cpu_num, k_thread_stack_t *stack, int sz, in arch_cpu_start() argument
55 arc_cpu_sp = K_KERNEL_STACK_BUFFER(stack) + sz; in arch_cpu_start()
/Zephyr-latest/drivers/wifi/winc1500/
Dwifi_winc1500_nm_bus_wrapper.c40 static int8_t nm_i2c_write(uint8_t *b, uint16_t sz) in nm_i2c_write() argument
45 static int8_t nm_i2c_read(uint8_t *rb, uint16_t sz) in nm_i2c_read() argument
/Zephyr-latest/include/zephyr/arch/arm64/
Darm_mmu.h152 #define MMU_REGION_FLAT_ENTRY(name, adr, sz, attrs) \ argument
153 MMU_REGION_ENTRY(name, adr, adr, sz, attrs)
/Zephyr-latest/subsys/bluetooth/controller/util/
Dmfifo.h44 #define MFIFO_DEFINE(name, sz, cnt) \ argument
49 .s = MROUND(sz), \
53 uint8_t MALIGN(4) m[MROUND(sz) * ((cnt) + 1)]; \

123