Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 580) sorted by relevance

12345678910>>...24

/Zephyr-Core-3.6.0/subsys/bluetooth/controller/util/
Dmem.c45 void *mem; in mem_acquire() local
52 mem = *mem_head; in mem_acquire()
53 memcpy(&head, mem, sizeof(head)); in mem_acquire()
62 return mem; in mem_acquire()
68 void mem_release(void *mem, void **mem_head) in mem_release() argument
79 memcpy(mem, mem_head, sizeof(mem)); in mem_release()
82 *((uint16_t *)MROUND((uint8_t *)mem + sizeof(mem))) = free_count; in mem_release()
84 *mem_head = mem; in mem_release()
105 uint16_t mem_index_get(const void *mem, const void *mem_pool, uint16_t mem_size) in mem_index_get() argument
107 return ((uint8_t *)mem - (uint8_t *)mem_pool) / mem_size; in mem_index_get()
[all …]
Dmemq.c92 memq_link_t *memq_enqueue(memq_link_t *link, void *mem, memq_link_t **tail) in memq_enqueue() argument
98 (*tail)->mem = mem; in memq_enqueue()
117 memq_link_t *memq_peek(memq_link_t *head, memq_link_t *tail, void **mem) in memq_peek() argument
125 if (mem) { in memq_peek()
126 *mem = head->mem; in memq_peek()
142 void **mem) in memq_peek_n() argument
147 head = memq_peek(head, tail, mem); in memq_peek_n()
168 memq_link_t *memq_dequeue(memq_link_t *tail, memq_link_t **head, void **mem) in memq_dequeue() argument
173 old_head = memq_peek(*head, tail, mem); in memq_dequeue()
Dmemq.h14 void *mem; /* payload */ member
32 memq_link_t *memq_enqueue(memq_link_t *link, void *mem, memq_link_t **tail);
33 memq_link_t *memq_peek(memq_link_t *head, memq_link_t *tail, void **mem);
35 void **mem);
36 memq_link_t *memq_dequeue(memq_link_t *tail, memq_link_t **head, void **mem);
Dmfifo.h118 uint8_t idx, void *mem, uint8_t *last) in mfifo_by_idx_enqueue() argument
122 *p = mem; /* store the payload which for API 2 is only a void-ptr */ in mfifo_by_idx_enqueue()
132 #define MFIFO_BY_IDX_ENQUEUE(name, i, mem) \ argument
134 (mem), &mfifo_fifo_##name.l)
145 uint8_t last, void **mem) in mfifo_enqueue_get() argument
152 *mem = NULL; /* Signal the failure */ in mfifo_enqueue_get()
160 *mem = (void *)(fifo + last * size); /* preceding buffer */ in mfifo_enqueue_get()
173 #define MFIFO_ENQUEUE_GET(name, mem) \ argument
176 mfifo_fifo_##name.l, (mem))
319 void *mem; in mfifo_dequeue() local
[all …]
/Zephyr-Core-3.6.0/arch/riscv/core/
Dasm_macros.inc12 .macro lr, rd, mem
13 ld \rd, \mem
16 .macro sr, rs, mem
17 sd \rs, \mem
23 .macro lr, rd, mem
24 lw \rd, \mem
27 .macro sr, rs, mem
28 sw \rs, \mem
35 .macro flr, rd, mem
36 fld \rd, \mem
[all …]
/Zephyr-Core-3.6.0/subsys/net/ip/
Dtp.c48 struct tp_mem *mem = k_malloc(sizeof(struct tp_mem) + size + in tp_malloc() local
49 sizeof(*mem->footer)); in tp_malloc()
51 mem->file = file; in tp_malloc()
52 mem->line = line; in tp_malloc()
53 mem->func = func; in tp_malloc()
55 mem->size = size; in tp_malloc()
57 mem->header = TP_MEM_HEADER_COOKIE; in tp_malloc()
59 mem->footer = (void *) ((uint8_t *) &mem->mem + size); in tp_malloc()
60 *mem->footer = TP_MEM_FOOTER_COOKIE; in tp_malloc()
62 sys_slist_append(&tp_mem, (sys_snode_t *) mem); in tp_malloc()
[all …]
/Zephyr-Core-3.6.0/tests/bluetooth/audio/mocks/src/
Dmem_slab.c10 int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, k_timeout_t timeout) in k_mem_slab_alloc() argument
13 *mem = NULL; in k_mem_slab_alloc()
17 *mem = malloc(slab->info.block_size); in k_mem_slab_alloc()
18 zassert_not_null(*mem); in k_mem_slab_alloc()
24 void k_mem_slab_free(struct k_mem_slab *slab, void *mem) in k_mem_slab_free() argument
26 free(mem); in k_mem_slab_free()
/Zephyr-Core-3.6.0/tests/boards/intel_adsp/mm/src/
Dmain.c24 uint32_t mem[1024]; member
57 vps[i].mem[0] = markers[i];
63 sys_cache_data_flush_range(&vps[i].mem[0], PAGE_SZ);
76 zassert_equal(vps[i].mem[0], *(uint32_t *)pa[i],
78 vps[i].mem[0], *(uint32_t *)pa[i]);
95 zassert_equal(vps2[i].mem[0], *(uint32_t *)pa[i],
121 zassert_equal(vps3[i].mem[0], *(uint32_t *)pa[i],
123 vps3[i].mem[0], *(uint32_t *)pa[i]);
130 vps3[i].mem[0] = poison;
136 sys_cache_data_flush_range(&vps3[i].mem[0], PAGE_SZ);
[all …]
/Zephyr-Core-3.6.0/include/zephyr/sys/
Dheap_listener.h72 void *mem, size_t bytes);
91 void *mem, size_t bytes);
148 void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes);
160 void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes);
275 static inline void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes)
278 ARG_UNUSED(mem);
282 static inline void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes)
285 ARG_UNUSED(mem);
Dsys_heap.h102 void sys_heap_init(struct sys_heap *heap, void *mem, size_t bytes);
151 void sys_heap_free(struct sys_heap *heap, void *mem);
196 size_t sys_heap_usable_size(struct sys_heap *heap, void *mem);
/Zephyr-Core-3.6.0/kernel/
Dmempool.c14 void *mem; in z_heap_aligned_alloc() local
29 mem = k_heap_aligned_alloc(heap, __align, size, K_NO_WAIT); in z_heap_aligned_alloc()
30 if (mem == NULL) { in z_heap_aligned_alloc()
34 heap_ref = mem; in z_heap_aligned_alloc()
36 mem = ++heap_ref; in z_heap_aligned_alloc()
37 __ASSERT(align == 0 || ((uintptr_t)mem & (align - 1)) == 0, in z_heap_aligned_alloc()
38 "misaligned memory at %p (align = %zu)", mem, align); in z_heap_aligned_alloc()
40 return mem; in z_heap_aligned_alloc()
Dmem_slab.c208 int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, k_timeout_t timeout) in k_mem_slab_alloc() argument
217 *mem = slab->free_list; in k_mem_slab_alloc()
230 *mem = NULL; in k_mem_slab_alloc()
238 *mem = _current->base.swap_data; in k_mem_slab_alloc()
253 void k_mem_slab_free(struct k_mem_slab *slab, void *mem) in k_mem_slab_free() argument
257 __ASSERT(((char *)mem >= slab->buffer) && in k_mem_slab_free()
258 ((((char *)mem - slab->buffer) % slab->info.block_size) == 0) && in k_mem_slab_free()
259 ((char *)mem <= (slab->buffer + (slab->info.block_size * in k_mem_slab_free()
270 z_thread_return_value_set_with_data(pending_thread, 0, mem); in k_mem_slab_free()
276 *(char **) mem = slab->free_list; in k_mem_slab_free()
[all …]
/Zephyr-Core-3.6.0/tests/lib/heap/src/
Dmain.c395 static void heap_alloc_cb(uintptr_t heap_id, void *mem, size_t bytes) in heap_alloc_cb() argument
398 listener_mem = mem; in heap_alloc_cb()
401 heap_id, mem, (uint32_t)bytes); in heap_alloc_cb()
404 static void heap_free_cb(uintptr_t heap_id, void *mem, size_t bytes) in heap_free_cb() argument
407 listener_mem = mem; in heap_free_cb()
410 heap_id, mem, (uint32_t)bytes); in heap_free_cb()
417 void *mem; in ZTEST() local
440 mem = sys_heap_alloc(&listener_heap, 32U); in ZTEST()
446 zassert_equal(listener_mem, mem, in ZTEST()
448 listener_mem, mem); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/lib/multi_heap/src/
Dtest_mheap_api.c121 char *mem; in ZTEST() local
124 mem = k_calloc(NMEMB, OVERFLOW_SIZE); in ZTEST()
125 zassert_is_null(mem, "calloc operation failed"); in ZTEST()
128 mem = k_calloc(NMEMB * 3, SIZE); in ZTEST()
129 zassert_is_null(mem, "calloc operation failed"); in ZTEST()
131 mem = k_calloc(NMEMB, SIZE); in ZTEST()
132 zassert_not_null(mem, "calloc operation failed"); in ZTEST()
136 zassert_equal(mem[i], 0); in ZTEST()
137 mem[i] = 1; in ZTEST()
140 k_free(mem); in ZTEST()
/Zephyr-Core-3.6.0/include/zephyr/drivers/pcie/
Dcontroller.h79 bool mem, bool mem64, size_t bar_size,
98 bool mem, bool mem64, size_t align,
121 bool mem, bool mem64, uintptr_t bar_bus_addr,
243 bool mem, bool mem64, size_t bar_size, in pcie_ctrl_region_allocate() argument
249 return api->region_allocate(dev, bdf, mem, mem64, bar_size, bar_bus_addr); in pcie_ctrl_region_allocate()
268 bool mem, bool mem64, size_t align, in pcie_ctrl_region_get_allocate_base() argument
274 return api->region_get_allocate_base(dev, bdf, mem, mem64, align, bar_base_addr); in pcie_ctrl_region_get_allocate_base()
296 bool mem, bool mem64, uintptr_t bar_bus_addr, in pcie_ctrl_region_translate() argument
306 return api->region_translate(dev, bdf, mem, mem64, bar_bus_addr, bar_addr); in pcie_ctrl_region_translate()
/Zephyr-Core-3.6.0/lib/heap/
Dheap.c159 uint8_t *mem = p, *base = (uint8_t *)chunk_buf(h); in mem_to_chunkid() local
160 return (mem - chunk_header_bytes(h) - base) / CHUNK_UNIT; in mem_to_chunkid()
163 void sys_heap_free(struct sys_heap *heap, void *mem) in sys_heap_free() argument
165 if (mem == NULL) { in sys_heap_free()
169 chunkid_t c = mem_to_chunkid(h, mem); in sys_heap_free()
176 "unexpected heap state (double-free?) for memory at %p", mem); in sys_heap_free()
185 mem); in sys_heap_free()
193 heap_listener_notify_free(HEAP_ID_FROM_POINTER(heap), mem, in sys_heap_free()
200 size_t sys_heap_usable_size(struct sys_heap *heap, void *mem) in sys_heap_usable_size() argument
203 chunkid_t c = mem_to_chunkid(h, mem); in sys_heap_usable_size()
[all …]
Dheap_listener.c31 void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes) in heap_listener_notify_alloc() argument
40 listener->alloc_cb(heap_id, mem, bytes); in heap_listener_notify_alloc()
47 void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes) in heap_listener_notify_free() argument
56 listener->free_cb(heap_id, mem, bytes); in heap_listener_notify_free()
/Zephyr-Core-3.6.0/drivers/virtualization/
Dvirt_ivshmem_shell.c67 uintptr_t mem; in cmd_ivshmem_shmem() local
76 size = ivshmem_get_mem(ivshmem, &mem); in cmd_ivshmem_shmem()
85 mem, size, id, vectors); in cmd_ivshmem_shmem()
95 uintptr_t mem; in cmd_ivshmem_dump() local
105 size = ivshmem_get_mem(ivshmem, &mem); in cmd_ivshmem_dump()
111 } else if ((mem + dump_pos + dump_size) > (mem + size)) { in cmd_ivshmem_dump()
114 shell_hexdump(sh, (const uint8_t *)mem+dump_pos, dump_size); in cmd_ivshmem_dump()
/Zephyr-Core-3.6.0/dts/riscv/sifive/
Driscv64-fu540.dtsi60 reg-names = "mem";
66 reg-names = "mem";
72 reg-names = "mem";
78 reg-names = "mem";
84 reg-names = "mem";
90 reg-names = "mem";
96 reg-names = "mem";
102 reg-names = "mem";
114 reg-names = "mem";
151 reg-names = "control", "mem";
/Zephyr-Core-3.6.0/tests/drivers/virtualization/ivshmem/plain/src/
Divshmem.c15 uintptr_t mem; in ZTEST() local
25 size = ivshmem_get_mem(ivshmem, &mem); in ZTEST()
27 zassert_not_null((void *)mem, "Shared memory cannot be null"); in ZTEST()
32 area_to_rw = (uint32_t *)mem; in ZTEST()
/Zephyr-Core-3.6.0/samples/subsys/zbus/benchmark/
Dbenchmark_256KB.robot38 ${mem} Get Substring ${result.stdout} -20
39 ${mem} Strip String ${mem}
40 ${mem} Convert To Integer ${mem}
41 RETURN ${mem}
/Zephyr-Core-3.6.0/drivers/pcie/host/
Dpcie_ecam.c214 bool mem, bool mem64, size_t bar_size, in pcie_ecam_region_allocate() argument
220 if (mem && !data->regions[PCIE_REGION_MEM64].size && in pcie_ecam_region_allocate()
226 if (!mem && !data->regions[PCIE_REGION_IO].size) { in pcie_ecam_region_allocate()
237 if (mem && ((mem64 && data->regions[PCIE_REGION_MEM64].size) || in pcie_ecam_region_allocate()
241 } else if (mem) { in pcie_ecam_region_allocate()
251 bool mem, bool mem64, size_t align, in pcie_ecam_region_get_allocate_base() argument
257 if (mem && !data->regions[PCIE_REGION_MEM64].size && in pcie_ecam_region_get_allocate_base()
263 if (!mem && !data->regions[PCIE_REGION_IO].size) { in pcie_ecam_region_get_allocate_base()
274 if (mem && ((mem64 && data->regions[PCIE_REGION_MEM64].size) || in pcie_ecam_region_get_allocate_base()
278 } else if (mem) { in pcie_ecam_region_get_allocate_base()
[all …]
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/tools/
Dacetool.py92 … self.mem, self.hugef, self.buf_list_addr, self.pos_buf_addr, self.n_bufs = self.setup_buf(buf_len)
100 self.mem.seek(0)
108 self.mem[0:bufl] = data[0:bufl]
109 self.mem[bufl:bufl+bufl] = data[0:bufl]
127 (mem, phys_addr, hugef) = map_phys_mem(self.stream_id)
137 mem[bdl_off:bdl_off + 32] = struct.pack("<QQQQ",
146 mem[i] = 0
149 return (mem, hugef, phys_addr + bdl_off, phys_addr+dpib_off, 2)
273 (mem, phys_addr, _) = map_phys_mem(hda_ostream_id)
274 mem[0:len(fw_bytes)] = fw_bytes
[all …]
Dcavstool.py88 … self.mem, self.hugef, self.buf_list_addr, self.pos_buf_addr, self.n_bufs = self.setup_buf(buf_len)
96 self.mem.seek(0)
104 self.mem[0:bufl] = data[0:bufl]
105 self.mem[bufl:bufl+bufl] = data[0:bufl]
123 (mem, phys_addr, hugef) = map_phys_mem(self.stream_id)
133 mem[bdl_off:bdl_off + 32] = struct.pack("<QQQQ",
142 mem[i] = 0
145 return (mem, hugef, phys_addr + bdl_off, phys_addr+dpib_off, 2)
263 (mem, phys_addr, _) = map_phys_mem(hda_ostream_id)
264 mem[0:len(fw_bytes)] = fw_bytes
[all …]
/Zephyr-Core-3.6.0/tests/boards/espressif_esp32/cache_coex/src/
Dcache_coex.c30 static int *mem; variable
165 mem[i] = value; in fill_value()
171 int *ptr = mem; in check_psram()
204 mem = k_malloc(SPIRAM_ALLOC_SIZE); in psram_init()
205 if (!mem) { in psram_init()
209 if (!esp_ptr_external_ram(mem)) { in psram_init()

12345678910>>...24