Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 180) sorted by relevance

12345678

/Zephyr-Core-3.7.0/arch/riscv/core/
Dfpu.S20 #define DO_FP_REGS(op, ptr) \ argument
21 op fa0, __z_riscv_fp_context_t_fa0_OFFSET (ptr); \
22 op fa1, __z_riscv_fp_context_t_fa1_OFFSET (ptr); \
23 op fa2, __z_riscv_fp_context_t_fa2_OFFSET (ptr); \
24 op fa3, __z_riscv_fp_context_t_fa3_OFFSET (ptr); \
25 op fa4, __z_riscv_fp_context_t_fa4_OFFSET (ptr); \
26 op fa5, __z_riscv_fp_context_t_fa5_OFFSET (ptr); \
27 op fa6, __z_riscv_fp_context_t_fa6_OFFSET (ptr); \
28 op fa7, __z_riscv_fp_context_t_fa7_OFFSET (ptr); \
29 op fs0, __z_riscv_fp_context_t_fs0_OFFSET (ptr); \
[all …]
/Zephyr-Core-3.7.0/tests/subsys/usb/uac2/src/
Duac2_desc.c171 const struct usb_desc_header **ptr = generated_uac2_descriptor_set; in ZTEST() local
178 iad = (const struct usb_association_descriptor *)*ptr; in ZTEST()
187 ptr++; in ZTEST()
190 iface = (const struct usb_if_descriptor *)*ptr; in ZTEST()
200 ptr++; in ZTEST()
203 zassert_mem_equal(reference_ac_interface_descriptor, *ptr, in ZTEST()
205 ptr++; in ZTEST()
206 zassert_mem_equal(reference_ac_clock_source_descriptor, *ptr, in ZTEST()
208 ptr++; in ZTEST()
209 zassert_mem_equal(reference_ac_hp_input_terminal_descriptor, *ptr, in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/lib/mem_alloc/src/
Dmain.c78 char *ptr = NULL; in _test_no_mem_realloc() local
81 reloc_ptr = realloc(ptr, BUF_LEN); in _test_no_mem_realloc()
118 char *ptr[64] = { NULL }; in ZTEST() local
132 for (size_t i = 0; i < ARRAY_SIZE(ptr); i++) { in ZTEST()
135 ptr[i] = malloc(sizeof *(ptr[i])); in ZTEST()
142 for (size_t i = 0; i < ARRAY_SIZE(ptr); i++) { in ZTEST()
143 free(ptr[i]); in ZTEST()
144 ptr[i] = NULL; in ZTEST()
147 for (size_t n = 0; n < ARRAY_SIZE(ptr); n++) { in ZTEST()
151 ptr[i] = malloc(sizeof *(ptr[i])); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/boards/native/nrf_bsim/common/cmsis/
Dcmsis_instr.h76 static inline uint32_t __STREXB(uint8_t value, volatile uint8_t *ptr) in __STREXB() argument
78 *ptr = value; in __STREXB()
89 static inline uint32_t __STREXH(uint16_t value, volatile uint16_t *ptr) in __STREXH() argument
91 *ptr = value; in __STREXH()
102 static inline uint32_t __STREXW(uint32_t value, volatile uint32_t *ptr) in __STREXW() argument
104 *ptr = value; in __STREXW()
116 static inline uint8_t __LDREXB(volatile uint8_t *ptr) in __LDREXB() argument
118 return *ptr; in __LDREXB()
129 static inline uint16_t __LDREXH(volatile uint16_t *ptr) in __LDREXH() argument
131 return *ptr; in __LDREXH()
[all …]
/Zephyr-Core-3.7.0/include/zephyr/internal/
Dsyscall_handler.h410 #define K_SYSCALL_MEMORY_SIZE_CHECK(ptr, size) \ argument
411 (((uintptr_t)(ptr) + (size)) >= (uintptr_t)(ptr))
431 #define K_SYSCALL_MEMORY(ptr, size, write) \ argument
432 K_SYSCALL_VERIFY_MSG(K_SYSCALL_MEMORY_SIZE_CHECK(ptr, size) \
433 && !Z_DETECT_POINTER_OVERFLOW(ptr, size) \
434 && (arch_buffer_validate((void *)(ptr), (size), (write)) \
437 (void *)(ptr), (size_t)(size), \
455 #define K_SYSCALL_MEMORY_READ(ptr, size) \ argument
456 K_SYSCALL_MEMORY(ptr, size, 0)
474 #define K_SYSCALL_MEMORY_WRITE(ptr, size) \ argument
[all …]
/Zephyr-Core-3.7.0/lib/posix/options/
Dfs.c41 struct posix_fs_desc *ptr = NULL; in posix_fs_alloc_obj() local
46 ptr = &desc_array[i]; in posix_fs_alloc_obj()
47 ptr->used = true; in posix_fs_alloc_obj()
48 ptr->is_dir = is_dir; in posix_fs_alloc_obj()
54 return ptr; in posix_fs_alloc_obj()
57 static inline void posix_fs_free_obj(struct posix_fs_desc *ptr) in posix_fs_free_obj() argument
59 ptr->used = false; in posix_fs_free_obj()
88 struct posix_fs_desc *ptr = NULL; in zvfs_open() local
100 ptr = posix_fs_alloc_obj(false); in zvfs_open()
101 if (ptr == NULL) { in zvfs_open()
[all …]
/Zephyr-Core-3.7.0/tests/modules/uoscore/src/oscore_testvector_tests/
Doscore_tests.c24 .master_secret.ptr = (uint8_t *)T1__MASTER_SECRET, in ZTEST()
26 .sender_id.ptr = (uint8_t *)T1__SENDER_ID, in ZTEST()
28 .recipient_id.ptr = (uint8_t *)T1__RECIPIENT_ID, in ZTEST()
30 .master_salt.ptr = (uint8_t *)T1__MASTER_SALT, in ZTEST()
32 .id_context.ptr = (uint8_t *)T1__ID_CONTEXT, in ZTEST()
57 zassert_mem_equal__(c_client.sc.sender_key.ptr, T1__SENDER_KEY, in ZTEST()
61 zassert_mem_equal__(c_client.rc.recipient_key.ptr, T1__RECIPIENT_KEY, in ZTEST()
65 zassert_mem_equal__(c_client.cc.common_iv.ptr, T1__COMMON_IV, in ZTEST()
83 .master_secret.ptr = (uint8_t *)T3__MASTER_SECRET, in ZTEST()
85 .sender_id.ptr = (uint8_t *)T3__SENDER_ID, in ZTEST()
[all …]
/Zephyr-Core-3.7.0/include/zephyr/arch/
Dcache.h339 bool arch_cache_is_ptr_cached(void *ptr);
340 #define cache_is_ptr_cached(ptr) arch_cache_is_ptr_cached(ptr) argument
342 bool arch_cache_is_ptr_uncached(void *ptr);
343 #define cache_is_ptr_uncached(ptr) arch_cache_is_ptr_uncached(ptr) argument
345 void __sparse_cache *arch_cache_cached_ptr_get(void *ptr);
346 #define cache_cached_ptr(ptr) arch_cache_cached_ptr_get(ptr) argument
348 void *arch_cache_uncached_ptr_get(void __sparse_cache *ptr);
349 #define cache_uncached_ptr(ptr) arch_cache_uncached_ptr_get(ptr) argument
/Zephyr-Core-3.7.0/include/zephyr/sys/
Dmpsc_lockfree.h57 #define mpsc_ptr_get(ptr) atomic_ptr_get(&(ptr)) argument
58 #define mpsc_ptr_set(ptr, val) atomic_ptr_set(&(ptr), val) argument
59 #define mpsc_ptr_set_get(ptr, val) atomic_ptr_set(&(ptr), val) argument
65 #define mpsc_ptr_get(ptr) ptr
66 #define mpsc_ptr_set(ptr, val) ptr = val
67 #define mpsc_ptr_set_get(ptr, val) \
69 mpsc_ptr_t tmp = ptr; \
70 ptr = val; \
Dutil.h146 #define IS_ARRAY_ELEMENT(array, ptr) \ argument
147 ((ptr) && POINTER_TO_UINT(array) <= POINTER_TO_UINT(ptr) && \
148 POINTER_TO_UINT(ptr) < POINTER_TO_UINT(&(array)[ARRAY_SIZE(array)]) && \
149 (POINTER_TO_UINT(ptr) - POINTER_TO_UINT(array)) % sizeof((array)[0]) == 0)
165 #define ARRAY_INDEX(array, ptr) \ argument
167 __ASSERT_NO_MSG(IS_ARRAY_ELEMENT(array, ptr)); \
168 (__typeof__((array)[0]) *)(ptr) - (array); \
181 #define PART_OF_ARRAY(array, ptr) \ argument
182 ((ptr) && POINTER_TO_UINT(array) <= POINTER_TO_UINT(ptr) && \
183 POINTER_TO_UINT(ptr) < POINTER_TO_UINT(&(array)[ARRAY_SIZE(array)]))
[all …]
/Zephyr-Core-3.7.0/lib/libc/minimal/source/stdout/
Dsprintf.c14 char *ptr; member
21 *(p->ptr) = c; in sprintf_out()
22 p->ptr += 1; in sprintf_out()
41 p.ptr = str; in snprintf()
48 *(p.ptr) = 0; in snprintf()
59 p.ptr = str; in sprintf()
66 *(p.ptr) = 0; in sprintf()
81 p.ptr = str; in vsnprintf()
86 *(p.ptr) = 0; in vsnprintf()
96 p.ptr = str; in vsprintf()
[all …]
/Zephyr-Core-3.7.0/subsys/portability/cmsis_rtos_v1/
Dcmsis_mempool.c31 void *ptr; in osPoolAlloc() local
34 &ptr, TIME_OUT) == 0) { in osPoolAlloc()
35 return ptr; in osPoolAlloc()
47 void *ptr; in osPoolCAlloc() local
50 &ptr, TIME_OUT) == 0) { in osPoolCAlloc()
51 (void)memset(ptr, 0, osPool->item_sz); in osPoolCAlloc()
52 return ptr; in osPoolCAlloc()
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-Core-3.7.0/subsys/net/lib/shell/
Dpkt.c13 static bool is_pkt_part_of_slab(const struct k_mem_slab *slab, const char *ptr) in is_pkt_part_of_slab() argument
19 if ((ptr < slab->buffer) || (ptr > slab->buffer + last_offset)) { in is_pkt_part_of_slab()
24 ptr_offset = ptr - slab->buffer; in is_pkt_part_of_slab()
33 const void *ptr; member
48 if (is_pkt_part_of_slab(slab, info->ptr)) { in check_context_pool()
55 static bool is_pkt_ptr_valid(const void *ptr) in is_pkt_ptr_valid() argument
61 if (is_pkt_part_of_slab(rx, ptr) || is_pkt_part_of_slab(tx, ptr)) { in is_pkt_ptr_valid()
68 info.ptr = ptr; in is_pkt_ptr_valid()
84 intptr_t ptr = 0; in get_net_pkt() local
98 ptr |= buf[i] << 8 * (len - 1 - i); in get_net_pkt()
[all …]
/Zephyr-Core-3.7.0/include/zephyr/arch/xtensa/
Dcache.h209 static inline bool arch_cache_is_ptr_cached(void *ptr) in arch_cache_is_ptr_cached() argument
211 size_t addr = (size_t) ptr; in arch_cache_is_ptr_cached()
229 static inline bool arch_cache_is_ptr_uncached(void *ptr) in arch_cache_is_ptr_uncached() argument
231 size_t addr = (size_t) ptr; in arch_cache_is_ptr_uncached()
277 static inline void __sparse_cache *arch_cache_cached_ptr_get(void *ptr) in arch_cache_cached_ptr_get() argument
279 return (__sparse_force void __sparse_cache *)z_xtrpoflip((uint32_t) ptr, in arch_cache_cached_ptr_get()
302 static inline void *arch_cache_uncached_ptr_get(void __sparse_cache *ptr) in arch_cache_uncached_ptr_get() argument
304 return (void *)z_xtrpoflip((__sparse_force uint32_t)ptr, in arch_cache_uncached_ptr_get()
309 static inline bool arch_cache_is_ptr_cached(void *ptr) in arch_cache_is_ptr_cached() argument
311 ARG_UNUSED(ptr); in arch_cache_is_ptr_cached()
[all …]
/Zephyr-Core-3.7.0/subsys/net/lib/zperf/
Dzperf_session.c39 struct session *ptr = &sessions[proto][i]; in get_session() local
43 ptr->ip.family == AF_INET && in get_session()
44 ptr->port == addr4->sin_port && in get_session()
45 net_ipv4_addr_cmp(&ptr->ip.in_addr, &addr4->sin_addr)) { in get_session()
47 active = ptr; in get_session()
53 ptr->ip.family == AF_INET6 && in get_session()
54 ptr->port == addr6->sin6_port && in get_session()
55 net_ipv6_addr_cmp(&ptr->ip.in6_addr, &addr6->sin6_addr)) { in get_session()
57 active = ptr; in get_session()
61 if (!free && (ptr->state == STATE_NULL || in get_session()
[all …]
/Zephyr-Core-3.7.0/kernel/
Dmempool.c43 void k_free(void *ptr) in k_free() argument
47 if (ptr != NULL) { in k_free()
48 heap_ref = ptr; in k_free()
50 ptr = heap_ref; in k_free()
54 k_heap_free(*heap_ref, ptr); in k_free()
117 void *k_realloc(void *ptr, size_t size) in k_realloc() argument
123 k_free(ptr); in k_realloc()
126 if (ptr == NULL) { in k_realloc()
129 heap_ref = ptr; in k_realloc()
130 ptr = --heap_ref; in k_realloc()
[all …]
/Zephyr-Core-3.7.0/tests/kernel/mem_slab/mslab/src/
Dmain.c61 void *ptr[NUMBLOCKS]; /* Pointer to memory block */ in helper_thread() local
63 (void)memset(ptr, 0, sizeof(ptr)); /* keep static checkers happy */ in helper_thread()
72 test_slab_get_all_blocks(ptr); in helper_thread()
88 k_mem_slab_free(&map_lgblks, ptr[0]); in helper_thread()
95 k_mem_slab_free(&map_lgblks, ptr[1]); in helper_thread()
101 k_mem_slab_free(&map_lgblks, ptr[i]); in helper_thread()
213 void *ptr[NUMBLOCKS]; /* Pointer to memory block */ in ZTEST() local
216 (void)memset(ptr, 0, sizeof(ptr)); in ZTEST()
224 test_slab_get_all_blocks(ptr); in ZTEST()
227 test_slab_free_all_blocks(ptr); in ZTEST()
/Zephyr-Core-3.7.0/lib/cpp/minimal/
Dcpp_new.cpp66 void operator delete(void* ptr) NOEXCEPT in operator delete() argument
68 free(ptr); in operator delete()
71 void operator delete[](void* ptr) NOEXCEPT in operator delete[]() argument
73 free(ptr); in operator delete[]()
77 void operator delete(void* ptr, size_t) NOEXCEPT in operator delete() argument
79 free(ptr); in operator delete()
82 void operator delete[](void* ptr, size_t) NOEXCEPT in operator delete[]() argument
84 free(ptr); in operator delete[]()
/Zephyr-Core-3.7.0/subsys/demand_paging/backing_store/
Dbacking_store_qemu_x86_tiny.c27 uintptr_t ptr = location; in location_to_flash() local
30 ptr -= CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET; in location_to_flash()
33 ptr += CONFIG_FLASH_BASE_ADDRESS; in location_to_flash()
35 __ASSERT_NO_MSG(ptr >= CONFIG_FLASH_BASE_ADDRESS); in location_to_flash()
36 __ASSERT_NO_MSG(ptr < (CONFIG_FLASH_BASE_ADDRESS in location_to_flash()
40 return UINT_TO_POINTER(ptr); in location_to_flash()
/Zephyr-Core-3.7.0/samples/net/sockets/big_http_download/src/
Dbig_http_download.c117 char *ptr; in parse_status() local
120 ptr = strstr(response, "HTTP"); in parse_status()
121 if (ptr == NULL) { in parse_status()
125 ptr = strstr(response, " "); in parse_status()
126 if (ptr == NULL) { in parse_status()
130 ptr++; in parse_status()
132 code = atoi(ptr); in parse_status()
142 char *ptr; in parse_header() local
144 ptr = strstr(response, ":"); in parse_header()
145 if (ptr == NULL) { in parse_header()
[all …]
/Zephyr-Core-3.7.0/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
89 *ptr++ = (char) (val + '0'); in net_byte_to_hex()
91 *ptr++ = (char) (val - 10 + base); in net_byte_to_hex()
95 *ptr = '\0'; in net_byte_to_hex()
97 return ptr; in net_byte_to_hex()
104 char *ptr = buf; in net_sprint_ll_addr_buf() local
126 ptr = net_byte_to_hex(ptr, (char)ll[i], 'A', true); in net_sprint_ll_addr_buf()
127 *ptr++ = ':'; in net_sprint_ll_addr_buf()
131 if (!(ptr - buf)) { in net_sprint_ll_addr_buf()
135 *(ptr - 1) = '\0'; in net_sprint_ll_addr_buf()
[all …]
/Zephyr-Core-3.7.0/include/zephyr/
Dcache.h458 static ALWAYS_INLINE bool sys_cache_is_ptr_cached(void *ptr) in sys_cache_is_ptr_cached() argument
461 return cache_is_ptr_cached(ptr); in sys_cache_is_ptr_cached()
463 ARG_UNUSED(ptr); in sys_cache_is_ptr_cached()
482 static ALWAYS_INLINE bool sys_cache_is_ptr_uncached(void *ptr) in sys_cache_is_ptr_uncached() argument
485 return cache_is_ptr_uncached(ptr); in sys_cache_is_ptr_uncached()
487 ARG_UNUSED(ptr); in sys_cache_is_ptr_uncached()
511 static ALWAYS_INLINE void __sparse_cache *sys_cache_cached_ptr_get(void *ptr) in sys_cache_cached_ptr_get() argument
514 return cache_cached_ptr(ptr); in sys_cache_cached_ptr_get()
516 return (__sparse_force void __sparse_cache *)ptr; in sys_cache_cached_ptr_get()
536 static ALWAYS_INLINE void *sys_cache_uncached_ptr_get(void __sparse_cache *ptr) in sys_cache_uncached_ptr_get() argument
[all …]
/Zephyr-Core-3.7.0/subsys/net/
Dbuf_simple.c185 void *ptr; in net_buf_simple_remove_u8() local
187 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_u8()
188 val = *(uint8_t *)ptr; in net_buf_simple_remove_u8()
196 void *ptr; in net_buf_simple_remove_le16() local
198 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le16()
199 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_le16()
207 void *ptr; in net_buf_simple_remove_be16() local
209 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be16()
210 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_be16()
220 void *ptr; in net_buf_simple_remove_le24() local
[all …]
/Zephyr-Core-3.7.0/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()

12345678