Home
last modified time | relevance | path

Searched refs:ptr (Results 26 – 50 of 191) sorted by relevance

12345678

/Zephyr-latest/tests/kernel/mem_protect/stackprot/src/
Dmapped_stack.c31 volatile char *ptr; in mapped_thread() local
39 ptr = mapped_stack_addr; in mapped_thread()
44 ptr -= CONFIG_MMU_PAGE_SIZE / 2; in mapped_thread()
47 ptr += mapped_stack_sz; in mapped_thread()
48 ptr += CONFIG_MMU_PAGE_SIZE / 2; in mapped_thread()
51 TC_PRINT("Trying to cause stack fault at %p\n", ptr); in mapped_thread()
53 *ptr = 0; in mapped_thread()
/Zephyr-latest/subsys/net/ip/
Dutils.c80 char *net_byte_to_hex(char *ptr, uint8_t byte, char base, bool pad) in net_byte_to_hex() argument
86 *ptr++ = (high < 10) ? (char) (high + '0') : (char) (high - 10 + base); in net_byte_to_hex()
89 *ptr++ = (low < 10) ? (char) (low + '0') : (char) (low - 10 + base); in net_byte_to_hex()
91 *ptr = '\0'; in net_byte_to_hex()
93 return ptr; in net_byte_to_hex()
100 char *ptr = buf; in net_sprint_ll_addr_buf() local
122 ptr = net_byte_to_hex(ptr, (char)ll[i], 'A', true); in net_sprint_ll_addr_buf()
123 *ptr++ = ':'; in net_sprint_ll_addr_buf()
127 if (!(ptr - buf)) { in net_sprint_ll_addr_buf()
131 *(ptr - 1) = '\0'; in net_sprint_ll_addr_buf()
[all …]
/Zephyr-latest/subsys/portability/cmsis_rtos_v1/
Dcmsis_mailq.c34 char *ptr; in osMailAlloc() local
44 (void **)&ptr, K_NO_WAIT); in osMailAlloc()
48 (void **)&ptr, K_FOREVER); in osMailAlloc()
52 (void **)&ptr, K_MSEC(millisec)); in osMailAlloc()
56 return ptr; in osMailAlloc()
68 char *ptr; in osMailCAlloc() local
78 (void **)&ptr, K_NO_WAIT); in osMailCAlloc()
82 (void **)&ptr, K_FOREVER); in osMailCAlloc()
86 (void **)&ptr, K_MSEC(millisec)); in osMailCAlloc()
90 (void)memset(ptr, 0, queue_def->item_sz); in osMailCAlloc()
[all …]
/Zephyr-latest/tests/lib/newlib/thread_safety/src/
Dstress.c40 int *volatile ptr; in malloc_thread() local
47 ptr = malloc(sizeof(int)); in malloc_thread()
48 zassert_not_null(ptr, "Out of memory"); in malloc_thread()
49 *ptr = val; in malloc_thread()
59 zassert_equal(*ptr, val, "Corrupted memory block"); in malloc_thread()
62 free(ptr); in malloc_thread()
/Zephyr-latest/scripts/logging/dictionary/dictionary_parser/
Dutils.py62 for ptr, string in string_mappings.items():
63 if ptr <= str_ptr < (ptr + len(string)):
64 whole_str = string_mappings[ptr]
65 return whole_str[str_ptr - ptr:]
/Zephyr-latest/lib/libc/minimal/source/stdout/
Dstdout_console.c68 size_t z_impl_zephyr_fwrite(const void *ZRESTRICT ptr, size_t size, in z_impl_zephyr_fwrite() argument
80 p = ptr; in z_impl_zephyr_fwrite()
99 static inline size_t z_vrfy_zephyr_fwrite(const void *ZRESTRICT ptr, in z_vrfy_zephyr_fwrite() argument
104 K_OOPS(K_SYSCALL_MEMORY_ARRAY_READ(ptr, nitems, size)); in z_vrfy_zephyr_fwrite()
105 return z_impl_zephyr_fwrite(ptr, size, nitems, stream); in z_vrfy_zephyr_fwrite()
110 size_t fwrite(const void *ZRESTRICT ptr, size_t size, size_t nitems, in fwrite() argument
113 return zephyr_fwrite(ptr, size, nitems, stream); in fwrite()
/Zephyr-latest/lib/heap/
Dmulti_heap.c96 void *ptr, size_t align, size_t bytes) in sys_multi_heap_aligned_realloc() argument
99 if (ptr == NULL) { in sys_multi_heap_aligned_realloc()
103 sys_multi_heap_free(mheap, ptr); in sys_multi_heap_aligned_realloc()
107 const struct sys_multi_heap_rec *rec = sys_multi_heap_get_heap(mheap, ptr); in sys_multi_heap_aligned_realloc()
112 void *new_ptr = sys_heap_aligned_realloc(rec->heap, ptr, align, bytes); in sys_multi_heap_aligned_realloc()
118 size_t old_size = sys_heap_usable_size(rec->heap, ptr); in sys_multi_heap_aligned_realloc()
123 memcpy(new_ptr, ptr, MIN(old_size, bytes)); in sys_multi_heap_aligned_realloc()
124 sys_multi_heap_free(mheap, ptr); in sys_multi_heap_aligned_realloc()
/Zephyr-latest/samples/arch/smp/pktqueue/src/
Dmain.c63 descriptors[queue_num][i].ptr = (uint8_t *)&headers[queue_num][i]; in init_datagram_queue()
68 descriptors[queue_num][i].ptr[j] = sys_rand8_get(); in init_datagram_queue()
70 descriptors[queue_num][i].ptr[j] = 0; in init_datagram_queue()
77 descriptors[queue_num][i].ptr, SIZE_OF_HEADER); in init_datagram_queue()
80 descriptors[queue_num][i].ptr[CRC_BYTE_1] = (uint8_t)(crc >> 8); in init_datagram_queue()
81 descriptors[queue_num][i].ptr[CRC_BYTE_2] = (uint8_t)(crc); in init_datagram_queue()
102 crc_orig = qin_ptr->ptr[CRC_BYTE_1] << 8; in test_thread()
103 crc_orig |= qin_ptr->ptr[11]; in test_thread()
106 qin_ptr->ptr[CRC_BYTE_1] = 0; in test_thread()
107 qin_ptr->ptr[CRC_BYTE_2] = 0; in test_thread()
[all …]
/Zephyr-latest/scripts/native_simulator/common/src/
Dnsi_host_trampolines.c24 void nsi_host_free(void *ptr) in nsi_host_free() argument
26 free(ptr); in nsi_host_free()
59 void *nsi_host_realloc(void *ptr, unsigned long size) in nsi_host_realloc() argument
61 return realloc(ptr, size); in nsi_host_realloc()
/Zephyr-latest/subsys/testsuite/ztest/include/zephyr/
Dztest_assert.h303 #define zassert_is_null(ptr, ...) zassert((ptr) == NULL, #ptr " is not NULL", ##__VA_ARGS__) argument
310 #define zassert_not_null(ptr, ...) zassert((ptr) != NULL, #ptr " is NULL", ##__VA_ARGS__) argument
469 #define zassume_is_null(ptr, ...) zassume((ptr) == NULL, #ptr " is not NULL", ##__VA_ARGS__) argument
479 #define zassume_not_null(ptr, ...) zassume((ptr) != NULL, #ptr " is NULL", ##__VA_ARGS__) argument
639 #define zexpect_is_null(ptr, ...) zexpect((ptr) == NULL, #ptr " is not NULL", ##__VA_ARGS__) argument
647 #define zexpect_not_null(ptr, ...) zexpect((ptr) != NULL, #ptr " is NULL", ##__VA_ARGS__) argument
/Zephyr-latest/lib/libc/common/source/stdlib/
Dmalloc.c241 void *realloc(void *ptr, size_t requested_size) in realloc() argument
245 void *ret = sys_heap_aligned_realloc(&z_malloc_heap, ptr, in realloc()
258 void free(void *ptr) in free() argument
261 sys_heap_free(&z_malloc_heap, ptr); in free()
277 void free(void *ptr) in free() argument
279 ARG_UNUSED(ptr); in free()
282 void *realloc(void *ptr, size_t size) in realloc() argument
284 ARG_UNUSED(ptr); in realloc()
312 void *reallocarray(void *ptr, size_t nmemb, size_t size) in reallocarray() argument
318 return realloc(ptr, size); in reallocarray()
/Zephyr-latest/tests/lib/cmsis_dsp/quaternionmath/src/
Df32.c242 for (float32_t *ptr = output; ptr < (output + length); ptr += 4) { in ZTEST() local
243 if (ptr[0] < 0.0f) { in ZTEST()
244 ptr[0] = -ptr[0]; in ZTEST()
245 ptr[1] = -ptr[1]; in ZTEST()
246 ptr[2] = -ptr[2]; in ZTEST()
247 ptr[3] = -ptr[3]; in ZTEST()
/Zephyr-latest/drivers/entropy/
Dentropy_smartbond.c239 const uint8_t *ptr; in smartbond_trng_isr() local
249 ptr = word; in smartbond_trng_isr()
252 ptr = rng_pool_put_bytes((struct rng_pool *)(entropy_smartbond_data.isr), ptr, in smartbond_trng_isr()
254 if (ptr < limit) { in smartbond_trng_isr()
260 ptr = rng_pool_put_bytes((struct rng_pool *)(entropy_smartbond_data.thr), in smartbond_trng_isr()
261 ptr, limit); in smartbond_trng_isr()
264 if (ptr < limit) { in smartbond_trng_isr()
330 const uint8_t *ptr = bytes; in entropy_smartbond_get_entropy_isr() local
353 while (ptr < limit && len) { in entropy_smartbond_get_entropy_isr()
354 buf[--len] = *ptr++; in entropy_smartbond_get_entropy_isr()
[all …]
/Zephyr-latest/tests/bluetooth/hci_codecs_info/src/
Dmain.c79 const uint8_t *ptr; in ZTEST() local
95 ptr = (uint8_t *)&codecs->status + sizeof(codecs->status); in ZTEST()
96 num_std_codecs = *ptr++; in ZTEST()
103 codec = (const struct bt_hci_std_codec_info_v2 *)ptr; in ZTEST()
104 ptr += sizeof(*codec); in ZTEST()
111 num_vs_codecs = *ptr++; in ZTEST()
117 codec = (const struct bt_hci_vs_codec_info_v2 *)ptr; in ZTEST()
118 ptr += sizeof(*codec); in ZTEST()
181 const uint8_t *ptr; in ZTEST() local
208 ptr = &rp->capabilities[0]; in ZTEST()
[all …]
/Zephyr-latest/tests/ztest/zexpect/src/
Dmain.c75 void *ptr = NULL; in ZTEST() local
77 zexpect_is_null(ptr); in ZTEST()
83 void *ptr = (void *)0x32137899; in ZTEST() local
85 zexpect_is_null(ptr); in ZTEST()
90 void *ptr = (void *)0x91517141; in ZTEST() local
92 zexpect_not_null(ptr); in ZTEST()
/Zephyr-latest/modules/lvgl/
Dlvgl_mem.c38 void *lvgl_realloc(void *ptr, size_t size) in lvgl_realloc() argument
44 ret = sys_heap_realloc(&lvgl_heap, ptr, size); in lvgl_realloc()
50 void lvgl_free(void *ptr) in lvgl_free() argument
55 sys_heap_free(&lvgl_heap, ptr); in lvgl_free()
/Zephyr-latest/include/zephyr/xen/
Dgeneric.h29 #define synch_cmpxchg(ptr, old, new) \ argument
30 ({ __typeof__(*ptr) stored = old; \
31 __atomic_compare_exchange_n(ptr, &stored, new, 0, __ATOMIC_SEQ_CST, \
/Zephyr-latest/tests/kernel/mem_protect/protection/src/
Dmain.c94 volatile uint32_t *ptr = (volatile uint32_t *)&rodata_var; in ZTEST() local
100 INFO("trying to write to rodata at %p\n", ptr); in ZTEST()
101 *ptr = ~RODATA_VALUE; in ZTEST()
105 if (*ptr == RODATA_VALUE) { in ZTEST()
107 } else if (*ptr == ~RODATA_VALUE) { in ZTEST()
/Zephyr-latest/arch/posix/core/
Dthread.c94 posix_thread_status_t *ptr = pa_thread_status; in posix_arch_thread_entry() local
96 z_thread_entry(ptr->entry_point, ptr->arg1, ptr->arg2, ptr->arg3); in posix_arch_thread_entry()
/Zephyr-latest/drivers/sensor/
Dshell_battery.c26 va_list ptr; in get_channels() local
29 va_start(ptr, dev); in get_channels()
35 chan = va_arg(ptr, int); in get_channels()
39 val = va_arg(ptr, struct sensor_value *); in get_channels()
42 va_end(ptr); in get_channels()
47 va_end(ptr); in get_channels()
/Zephyr-latest/tests/net/ppp/driver/src/
Dmain.c296 static uint8_t unescape(uint8_t **ptr) in unescape() argument
298 uint8_t *pos = *ptr; in unescape()
305 *ptr += 2; in unescape()
310 *ptr += 1; in unescape()
320 uint8_t *ptr; in ppp_verify_fcs() local
326 ptr = buf; in ppp_verify_fcs()
327 while (ptr < &buf[len]) { in ppp_verify_fcs()
328 net_pkt_write_u8(pkt, unescape(&ptr)); in ppp_verify_fcs()
391 uint8_t *ptr; in ppp_calc_fcs() local
397 ptr = buf; in ppp_calc_fcs()
[all …]
/Zephyr-latest/tests/lib/newlib/heap_listener/src/
Dmain.c38 void *ptr; variable
55 ptr = malloc(4096); in ZTEST()
67 free(ptr); in ZTEST()
/Zephyr-latest/subsys/testsuite/ztest/src/
Dztest_posix.c107 struct ztest_suite_node *ptr; in z_ztest_list_tests() local
113 for (ptr = _ztest_suite_node_list_start; ptr < _ztest_suite_node_list_end; ++ptr) { in z_ztest_list_tests()
115 while ((test = z_ztest_get_next_test(ptr->name, test)) != NULL) { in z_ztest_list_tests()
/Zephyr-latest/drivers/sensor/ams/ccs811/
Dccs811.c79 struct ccs811_configver_type *ptr) in ccs811_configver_fetch() argument
86 if (!ptr) { in ccs811_configver_fetch()
92 rc = i2c_write_read_dt(&config->i2c, &cmd, sizeof(cmd), &ptr->hw_version, in ccs811_configver_fetch()
93 sizeof(ptr->hw_version)); in ccs811_configver_fetch()
97 (uint8_t *)&ptr->fw_boot_version, in ccs811_configver_fetch()
98 sizeof(ptr->fw_boot_version)); in ccs811_configver_fetch()
99 ptr->fw_boot_version = sys_be16_to_cpu(ptr->fw_boot_version); in ccs811_configver_fetch()
105 (uint8_t *)&ptr->fw_app_version, in ccs811_configver_fetch()
106 sizeof(ptr->fw_app_version)); in ccs811_configver_fetch()
107 ptr->fw_app_version = sys_be16_to_cpu(ptr->fw_app_version); in ccs811_configver_fetch()
[all …]
/Zephyr-latest/lib/mem_blocks/
Dmem_blocks.c53 static int free_blocks(sys_mem_blocks_t *mem_block, void *ptr, in free_blocks() argument
57 uint8_t *blk = ptr; in free_blocks()
109 void *ptr = alloc_blocks(mem_block, count); in sys_mem_blocks_alloc_contiguous() local
111 if (ptr == NULL) { in sys_mem_blocks_alloc_contiguous()
116 *out_block = ptr; in sys_mem_blocks_alloc_contiguous()
119 ptr, count << mem_block->info.blk_sz_shift); in sys_mem_blocks_alloc_contiguous()
149 void *ptr = alloc_blocks(mem_block, 1); in sys_mem_blocks_alloc() local
151 if (ptr == NULL) { in sys_mem_blocks_alloc()
155 out_blocks[i] = ptr; in sys_mem_blocks_alloc()
159 ptr, in sys_mem_blocks_alloc()
[all …]

12345678