Home
last modified time | relevance | path

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

1234567

/Zephyr-Core-3.6.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.6.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.6.0/boards/posix/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.6.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.6.0/lib/posix/options/
Dfs.c39 struct posix_fs_desc *ptr = NULL; in posix_fs_alloc_obj() local
44 ptr = &desc_array[i]; in posix_fs_alloc_obj()
45 ptr->used = true; in posix_fs_alloc_obj()
46 ptr->is_dir = is_dir; in posix_fs_alloc_obj()
52 return ptr; in posix_fs_alloc_obj()
55 static inline void posix_fs_free_obj(struct posix_fs_desc *ptr) in posix_fs_free_obj() argument
57 ptr->used = false; in posix_fs_free_obj()
91 struct posix_fs_desc *ptr = NULL; in open() local
103 ptr = posix_fs_alloc_obj(false); in open()
104 if (ptr == NULL) { in open()
[all …]
/Zephyr-Core-3.6.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.6.0/tests/subsys/usb/uac2/src/
Duac2_desc.c178 const uint8_t *ptr = generated_uac2_descriptors; in ZTEST() local
184 iad = (const struct usb_association_descriptor *)ptr; in ZTEST()
193 ptr += sizeof(struct usb_association_descriptor); in ZTEST()
196 iface = (const struct usb_if_descriptor *)ptr; in ZTEST()
206 ptr += sizeof(struct usb_if_descriptor); in ZTEST()
209 zassert_mem_equal(reference_ac_descriptors, ptr, in ZTEST()
211 ptr += ARRAY_SIZE(reference_ac_descriptors); in ZTEST()
214 iface = (const struct usb_if_descriptor *)ptr; in ZTEST()
224 ptr += sizeof(struct usb_if_descriptor); in ZTEST()
227 iface = (const struct usb_if_descriptor *)ptr; in ZTEST()
[all …]
/Zephyr-Core-3.6.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.6.0/include/zephyr/rtio/
Drtio_mpsc.h43 #define mpsc_ptr_get(ptr) atomic_ptr_get(&(ptr)) argument
44 #define mpsc_ptr_set(ptr, val) atomic_ptr_set(&(ptr), val) argument
45 #define mpsc_ptr_set_get(ptr, val) atomic_ptr_set(&(ptr), val) argument
51 #define mpsc_ptr_get(ptr) ptr
52 #define mpsc_ptr_set(ptr, val) ptr = val
53 #define mpsc_ptr_set_get(ptr, val) \
55 mpsc_ptr_t tmp = ptr; \
56 ptr = val; \
/Zephyr-Core-3.6.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.6.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.6.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.6.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.6.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.6.0/include/zephyr/sys/
Dutil.h143 #define IS_ARRAY_ELEMENT(array, ptr) \ argument
144 ((ptr) && POINTER_TO_UINT(array) <= POINTER_TO_UINT(ptr) && \
145 POINTER_TO_UINT(ptr) < POINTER_TO_UINT(&(array)[ARRAY_SIZE(array)]) && \
146 (POINTER_TO_UINT(ptr) - POINTER_TO_UINT(array)) % sizeof((array)[0]) == 0)
162 #define ARRAY_INDEX(array, ptr) \ argument
164 __ASSERT_NO_MSG(IS_ARRAY_ELEMENT(array, ptr)); \
165 (__typeof__((array)[0]) *)(ptr) - (array); \
178 #define PART_OF_ARRAY(array, ptr) \ argument
179 ((ptr) && POINTER_TO_UINT(array) <= POINTER_TO_UINT(ptr) && \
180 POINTER_TO_UINT(ptr) < POINTER_TO_UINT(&(array)[ARRAY_SIZE(array)]))
[all …]
/Zephyr-Core-3.6.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.6.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.6.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.6.0/samples/net/sockets/big_http_download/src/
Dbig_http_download.c115 char *ptr; in parse_status() local
118 ptr = strstr(response, "HTTP"); in parse_status()
119 if (ptr == NULL) { in parse_status()
123 ptr = strstr(response, " "); in parse_status()
124 if (ptr == NULL) { in parse_status()
128 ptr++; in parse_status()
130 code = atoi(ptr); in parse_status()
140 char *ptr; in parse_header() local
142 ptr = strstr(response, ":"); in parse_header()
143 if (ptr == NULL) { in parse_header()
[all …]
/Zephyr-Core-3.6.0/subsys/net/ip/
Dutils.c66 char *net_byte_to_hex(char *ptr, uint8_t byte, char base, bool pad) in net_byte_to_hex() argument
75 *ptr++ = (char) (val + '0'); in net_byte_to_hex()
77 *ptr++ = (char) (val - 10 + base); in net_byte_to_hex()
81 *ptr = '\0'; in net_byte_to_hex()
83 return ptr; in net_byte_to_hex()
90 char *ptr = buf; in net_sprint_ll_addr_buf() local
112 ptr = net_byte_to_hex(ptr, (char)ll[i], 'A', true); in net_sprint_ll_addr_buf()
113 *ptr++ = ':'; in net_sprint_ll_addr_buf()
117 if (!(ptr - buf)) { in net_sprint_ll_addr_buf()
121 *(ptr - 1) = '\0'; in net_sprint_ll_addr_buf()
[all …]
/Zephyr-Core-3.6.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.6.0/subsys/net/
Dbuf_simple.c171 void *ptr; in net_buf_simple_remove_u8() local
173 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_u8()
174 val = *(uint8_t *)ptr; in net_buf_simple_remove_u8()
182 void *ptr; in net_buf_simple_remove_le16() local
184 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le16()
185 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_le16()
193 void *ptr; in net_buf_simple_remove_be16() local
195 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be16()
196 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_be16()
206 void *ptr; in net_buf_simple_remove_le24() local
[all …]
/Zephyr-Core-3.6.0/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-Core-3.6.0/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:]

1234567