Home
last modified time | relevance | path

Searched full:tail (Results 1 – 25 of 139) sorted by relevance

123456

/Zephyr-latest/subsys/bluetooth/controller/util/
Dmemq.c9 * FIFO-style "memory queue" permitting enqueue at tail and dequeue from head.
14 * is given by head == tail.
17 * Invariant: The tail element's mem pointer is DontCare.
30 * where T is the pointer to Tail link-element (newest element).
48 * @param tail[out] Tail of queue. Will be updated
51 memq_link_t *memq_init(memq_link_t *link, memq_link_t **head, memq_link_t **tail) in memq_init() argument
53 /* Head and tail pointer to the initial link - forms an empty queue */ in memq_init()
54 *head = *tail = link; in memq_init()
63 * @param tail[in,out] Tail of queue. Will be updated
66 memq_link_t *memq_deinit(memq_link_t **head, memq_link_t **tail) in memq_deinit() argument
[all …]
Dmemq.h22 memq_link_t *tail; \
26 memq_link_t **tail);
29 memq_init(link, &memq_##name.head, &memq_##name.tail)
31 memq_link_t *memq_deinit(memq_link_t **head, memq_link_t **tail);
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);
34 memq_link_t *memq_peek_n(memq_link_t *head, memq_link_t *tail, uint8_t n,
36 memq_link_t *memq_dequeue(memq_link_t *tail, memq_link_t **head, void **mem);
Dmayfly.c21 memq_link_t *tail; member
47 &mft[callee_id][caller_id].tail); in mayfly_init()
118 memq_enqueue(m->_link, m, &mft[callee_id][caller_id].tail); in mayfly_enqueue()
154 memq_dequeue(mft[callee_id][caller_id].tail, in dequeue()
174 memq_enqueue(link, m, &mft[callee_id][callee_id].tail); in dequeue()
198 mft[callee_id][caller_id].tail, in mayfly_run()
225 mft[callee_id][caller_id].tail, in mayfly_run()
/Zephyr-latest/include/zephyr/sys/
Dmpsc_lockfree.h88 struct mpsc_node *tail; member
102 .tail = (struct mpsc_node *)&symbol.stub, \
116 q->tail = &q->stub; in mpsc_init()
148 struct mpsc_node *tail = q->tail; in mpsc_pop() local
149 struct mpsc_node *next = (struct mpsc_node *)mpsc_ptr_get(tail->next); in mpsc_pop()
152 if (tail == &q->stub) { in mpsc_pop()
157 q->tail = next; in mpsc_pop()
158 tail = next; in mpsc_pop()
164 q->tail = next; in mpsc_pop()
165 return tail; in mpsc_pop()
[all …]
Ddlist.h18 * The lists are expected to be initialized such that both the head and tail
42 struct _dnode *tail; /* ptr to tail of list (sys_dlist_t) */ member
205 list->tail = (sys_dnode_t *)list; in sys_dlist_init()
253 * @brief check if a node is the list's tail
258 * @return true if node is the tail, false otherwise
263 return list->tail == node; in sys_dlist_is_tail()
291 return list->head != list->tail; in sys_dlist_has_multiple_nodes()
330 * @return a pointer to the next element from a node, NULL if node is the tail
336 return (node == list->tail) ? NULL : node->next; in sys_dlist_peek_next_no_check()
345 * @return a pointer to the next element from a node, NULL if node is the tail
[all …]
Dlist_gen.h116 void *head, void *tail) \
118 if (head != NULL && tail != NULL) { \
128 (sys_ ## __nname ## _t *)tail); \
138 sys_ ## __nname ## _t *head, *tail; \
140 tail = sys_ ## __lname ## _peek_tail(list_to_append); \
141 sys_ ## __lname ## _append_list(list, head, tail); \
197 /* Was node also the tail? */ \
206 /* Was node the tail? */ \
/Zephyr-latest/boards/native/nrf_bsim/common/
Dbstests_entry.c33 struct bst_test_list *tail = tests; in bst_add_tests() local
36 if (tail) { in bst_add_tests()
38 while (tail->next) { in bst_add_tests()
39 tail = tail->next; in bst_add_tests()
47 tail = head; in bst_add_tests()
52 tail->next = bs_malloc(sizeof(struct bst_test_list)); in bst_add_tests()
53 tail = tail->next; in bst_add_tests()
54 tail->test_instance = (struct bst_test_instance *) in bst_add_tests()
56 tail->next = NULL; in bst_add_tests()
/Zephyr-latest/tests/subsys/ipc/ipc_sessions/interoperability/
Dpbuf_v1.c158 uint32_t tail = MIN(len, blen - wr_idx); in pbuf_write() local
160 memcpy(&data_loc[wr_idx], data, tail); in pbuf_write()
161 sys_cache_data_flush_range(&data_loc[wr_idx], tail); in pbuf_write()
163 if (len > tail) { in pbuf_write()
165 memcpy(&data_loc[0], data + tail, len - tail); in pbuf_write()
166 sys_cache_data_flush_range(&data_loc[0], len - tail); in pbuf_write()
236 uint32_t tail = MIN(blen - rd_idx, len); in pbuf_read() local
238 sys_cache_data_invd_range(&data_loc[rd_idx], tail); in pbuf_read()
239 memcpy(buf, &data_loc[rd_idx], tail); in pbuf_read()
241 if (len > tail) { in pbuf_read()
[all …]
/Zephyr-latest/tests/kernel/queue/src/
Dtest_queue_fail.c51 * 2. Verify that the list's tail is empty.
63 static qdata_t *head = NULL, *tail = &data_l[1]; in ZTEST() local
70 (uint32_t *)tail) == -EINVAL, in ZTEST()
72 /* Check if the list of tail is equal to null */ in ZTEST()
74 tail = NULL; in ZTEST()
76 (uint32_t *)tail) == -EINVAL, in ZTEST()
77 "failed to CHECKIF tail == NULL"); in ZTEST()
99 * a slist is empty or a slist's tail is null.
118 /* Check if the tail of the slist is null */ in ZTEST()
121 slist.tail = NULL; in ZTEST()
[all …]
/Zephyr-latest/subsys/ipc/ipc_service/lib/
Dpbuf.c161 uint32_t tail = MIN(len, blen - wr_idx); in pbuf_write() local
163 memcpy(&data_loc[wr_idx], data, tail); in pbuf_write()
164 sys_cache_data_flush_range(&data_loc[wr_idx], tail); in pbuf_write()
166 if (len > tail) { in pbuf_write()
168 memcpy(&data_loc[0], data + tail, len - tail); in pbuf_write()
169 sys_cache_data_flush_range(&data_loc[0], len - tail); in pbuf_write()
277 uint32_t tail = MIN(blen - rd_idx, len); in pbuf_read() local
279 sys_cache_data_invd_range(&data_loc[rd_idx], tail); in pbuf_read()
280 memcpy(buf, &data_loc[rd_idx], tail); in pbuf_read()
282 if (len > tail) { in pbuf_read()
[all …]
/Zephyr-latest/samples/arch/smp/pktqueue/src/
Dpktqueue.c17 queue->head = queue->tail = desc; in phdr_desc_enqueue()
19 queue->tail->next = desc; in phdr_desc_enqueue()
20 queue->tail = desc; in phdr_desc_enqueue()
/Zephyr-latest/tests/lib/lockfree/src/
Dtest_mpsc.c29 struct mpsc_node *stub, *next, *tail; in ZTEST() local
34 tail = push_pop_q.tail; in ZTEST()
39 zassert_equal(tail, stub, "Tail should point at stub"); in ZTEST()
54 tail = push_pop_q.tail; in ZTEST()
56 zassert_equal(tail, stub, "Tail should point at stub"); in ZTEST()
/Zephyr-latest/tests/benchmarks/data_structure_perf/dlist_perf/src/
Ddlist_perf.c177 * @brief Test that access the 'head' and 'tail' in constant time
180 * defined two pointers---'head','tail'.No matter how many nodes
181 * dlist have, get head and tail from the dlist directly.the time
182 * complexity of accessing head and tail is O(1).
190 sys_dnode_t *head, *tail; in ZTEST() local
203 /* Get 'tail' node directly, the time complexity is O(1) */ in ZTEST()
204 tail = list.tail; in ZTEST()
205 zassert_true(tail == &node[ARRAY_SIZE(node) - 1], in ZTEST()
206 "dlist can't access 'tail' in constant time"); in ZTEST()
/Zephyr-latest/doc/kernel/data_structures/
Ddlist.rst10 the head, tail or any internal node). To do this, the list stores two
22 Primitive operations may retrieve the head/tail of a list and the
30 :c:func:`sys_dlist_remove`, by adding a node to the head or tail of a list
54 struct contains "head" and "tail" pointer fields, the :c:type:`sys_dnode_t`
63 * The head and tail of the list can be detected by comparing the
67 of inserting at the head or tail. There are never any NULL pointers
Dslist.rst9 constant-time access to the first (head) and last (tail) elements of
10 the list, insertion before the head and after the tail of the list and
35 Lists may be modified by adding a single node at the head or tail with
70 "head" and "tail" pointer fields. And a :c:type:`sys_snode_t` stores only a
94 and "set" primitives for each of head, tail and next pointers on their
/Zephyr-latest/subsys/sip_svc/
Dsip_svc_id_mgr.c60 id_pool->tail = size - 1; in sip_svc_id_mgr_create()
102 if (id_pool->head == id_pool->tail) { in sip_svc_id_mgr_alloc()
104 id_pool->tail = SIP_SVC_ID_INVALID; in sip_svc_id_mgr_alloc()
142 id_pool->tail = 0; in sip_svc_id_mgr_free()
144 id_pool->tail++; in sip_svc_id_mgr_free()
145 if (id_pool->tail == id_pool->size) { in sip_svc_id_mgr_free()
146 id_pool->tail = 0; in sip_svc_id_mgr_free()
148 if (id_pool->head == id_pool->tail) { in sip_svc_id_mgr_free()
153 id_pool->id_list[id_pool->tail] = id; in sip_svc_id_mgr_free()
/Zephyr-latest/tests/unit/list/
Ddlist.c149 sys_dnode_t *tail, in verify_tail_head() argument
156 if (sys_dlist_peek_tail(list) != tail) { in verify_tail_head()
198 "test_list head/tail are wrong"); in ZTEST()
216 "test_list head/tail are wrong"); in ZTEST()
233 "test_list head/tail are wrong"); in ZTEST()
243 "test_list head/tail are wrong"); in ZTEST()
254 "test_list head/tail are wrong"); in ZTEST()
267 "test_list head/tail are wrong"); in ZTEST()
276 "test_list head/tail are wrong"); in ZTEST()
285 "test_list head/tail are wrong"); in ZTEST()
[all …]
Dsflist.c150 sys_sfnode_t *tail, in verify_tail_head() argument
157 if (sys_sflist_peek_tail(list) != tail) { in verify_tail_head()
203 "test_list head/tail are wrong"); in ZTEST()
217 "test_list head/tail are wrong"); in ZTEST()
234 "test_list head/tail are wrong"); in ZTEST()
244 "test_list head/tail are wrong"); in ZTEST()
255 "test_list head/tail are wrong"); in ZTEST()
268 "test_list head/tail are wrong"); in ZTEST()
277 "test_list head/tail are wrong"); in ZTEST()
286 "test_list head/tail are wrong"); in ZTEST()
Dslist.c150 sys_snode_t *tail, in verify_tail_head() argument
157 if (sys_slist_peek_tail(list) != tail) { in verify_tail_head()
203 "test_list head/tail are wrong"); in ZTEST()
224 "test_list head/tail are wrong"); in ZTEST()
241 "test_list head/tail are wrong"); in ZTEST()
251 "test_list head/tail are wrong"); in ZTEST()
262 "test_list head/tail are wrong"); in ZTEST()
283 "test_list head/tail are wrong"); in ZTEST()
292 "test_list head/tail are wrong"); in ZTEST()
301 "test_list head/tail are wrong"); in ZTEST()
[all …]
/Zephyr-latest/drivers/ethernet/
Deth_sam_gmac.c409 rb->tail = 0U; in ring_buffer_reset()
419 __ASSERT(rb->tail != rb->head, in ring_buffer_get()
422 val = rb->buf[rb->tail]; in ring_buffer_get()
423 MODULO_INC(rb->tail, rb->len); in ring_buffer_get()
436 __ASSERT(rb->tail != rb->head, in ring_buffer_put()
482 rx_desc_list->tail = 0U; in rx_descriptors_init()
519 tx_desc_list->tail = 0U; in tx_descriptors_init()
714 __ASSERT(tx_desc_list->buf[tx_desc_list->tail].w1 & GMAC_TXW1_USED, in tx_completed()
717 while (tx_desc_list->tail != tx_desc_list->head) { in tx_completed()
719 tx_desc = &tx_desc_list->buf[tx_desc_list->tail]; in tx_completed()
[all …]
DKconfig.dsa52 bool "Support for tail tagging"
55 Add support for tail tagging on DSA device.
Deth_xmc4xxx.c360 uint16_t tail; in eth_xmc4xxx_rx_pkt() local
366 tail = dev_data->dma_desc_rx_tail; in eth_xmc4xxx_rx_pkt()
367 dma_desc = &rx_dma_desc[tail]; in eth_xmc4xxx_rx_pkt()
386 MODULO_INC_RX(tail); in eth_xmc4xxx_rx_pkt()
388 if (tail == dev_data->dma_desc_rx_tail) { in eth_xmc4xxx_rx_pkt()
393 dma_desc = &rx_dma_desc[tail]; in eth_xmc4xxx_rx_pkt()
400 frame_end_index = tail; in eth_xmc4xxx_rx_pkt()
412 tail = dev_data->dma_desc_rx_tail; in eth_xmc4xxx_rx_pkt()
413 dma_desc = &rx_dma_desc[tail]; in eth_xmc4xxx_rx_pkt()
418 frag = dev_data->rx_frag_list[tail]; in eth_xmc4xxx_rx_pkt()
[all …]
/Zephyr-latest/drivers/cache/
Dcache_aspeed.c79 * head tail
94 uint32_t tail; in get_n_cacheline() local
99 /* roundup the tail address */ in get_n_cacheline()
100 tail = addr + size + (CACHE_LINE_SIZE - 1); in get_n_cacheline()
101 tail = CACHE_ALIGNED_ADDR(tail); in get_n_cacheline()
103 n = (tail - *p_head) >> CACHE_LINE_SIZE_LOG2; in get_n_cacheline()
/Zephyr-latest/subsys/logging/backends/
Dlog_backend_adsp_mtrace.c101 size_t tail = MTRACE_LOG_BUF_SIZE - w; in mtrace_out() local
102 size_t head = out - tail; in mtrace_out()
104 memcpy(data + w, str, tail); in mtrace_out()
105 memcpy(data, str + tail, head); in mtrace_out()
/Zephyr-latest/tests/kernel/fifo/fifo_api/src/
Dtest_fifo_contexts.c31 static fdata_t *head = &data_l[0], *tail = &data_l[LIST_LEN - 1]; in tfifo_put() local
33 head->snode.next = (sys_snode_t *)tail; in tfifo_put()
34 tail->snode.next = NULL; in tfifo_put()
35 k_fifo_put_list(pfifo, (uint32_t *)head, (uint32_t *)tail); in tfifo_put()

123456