/Zephyr-latest/subsys/bluetooth/controller/util/ |
D | memq.c | 2 * Copyright (c) 2016-2017 Nordic Semiconductor ASA 5 * SPDX-License-Identifier: Apache-2.0 9 * FIFO-style "memory queue" permitting enqueue at tail and dequeue from head. 12 * Implemented as a singly-linked list, with always one-more element. 13 * The linked list must always contain at least one link-element, as emptiness 14 * is given by head == tail. 15 * For a queue to be valid, it must be initialized with an initial link-element. 20 * link-element, but the link-element before it! 23 * ------------------------+------------------------------- 24 * memq_init(I,H,T) | H -> I[] <- T [all …]
|
D | memq.h | 2 * Copyright (c) 2016-2017 Nordic Semiconductor ASA 5 * SPDX-License-Identifier: Apache-2.0 9 * @brief Element of a memory-queue 21 memq_link_t *head; \ 25 memq_link_t *memq_init(memq_link_t *link, memq_link_t **head, 29 memq_init(link, &memq_##name.head, &memq_##name.tail) 31 memq_link_t *memq_deinit(memq_link_t **head, 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);
|
D | mem.c | 5 * SPDX-License-Identifier: Apache-2.0 20 /* Store free mem_count after the list's next pointer at an 32-bit in mem_init() 26 * next pointer is stored in the first 32-bit of each block in mem_init() 28 (void)memset(((uint8_t *)mem_pool + (mem_size * (--mem_count))), 0, in mem_init() 30 while (mem_count--) { in mem_init() 44 void *head; in mem_acquire() local 50 free_count--; in mem_acquire() 53 memcpy(&head, mem, sizeof(head)); in mem_acquire() 56 if (head) { in mem_acquire() 57 *((uint16_t *)MROUND((uint8_t *)head + sizeof(head))) = in mem_acquire() [all …]
|
/Zephyr-latest/tests/subsys/usb/desc_sections/src/ |
D | desc_sections.c | 4 * SPDX-License-Identifier: Apache-2.0 17 /* Linker-defined symbols bound the USB descriptor structs */ 113 static void interface_config(struct usb_desc_header *head, in interface_config() argument 116 struct usb_if_descriptor *if_desc = (struct usb_if_descriptor *)head; in interface_config() 118 LOG_DBG("head %p iface_num %u", head, iface_num); in interface_config() 120 if_desc->bInterfaceNumber = iface_num; in interface_config() 130 if (cfg_data->interface_descriptor == iface) { in usb_get_cfg_data() 142 for (int i = 0; i < cfg_data->num_endpoints; i++) { in find_cfg_data_ep() 143 if (cfg_data->endpoint[i].ep_addr == in find_cfg_data_ep() 144 ep_descr->bEndpointAddress) { in find_cfg_data_ep() [all …]
|
/Zephyr-latest/subsys/usb/device/ |
D | usb_descriptor.c | 1 /* usb_descriptor.c - USB common device descriptor definition */ 7 * SPDX-License-Identifier: Apache-2.0 22 * ascii_idx_max = bLength / 2 - 2 25 #define USB_BSTRING_ASCII_IDX_MAX(n) (n / 2 - 2) 29 * utf16le_idx_max = sizeof(initializer_string) * 2 - 2 - 1 30 * utf16le_idx_max = bLength - 2 - 1 33 #define USB_BSTRING_UTF16LE_IDX_MAX(n) (n - 3) 35 /* Linker-defined symbols bound the USB descriptor structs */ 185 * This function fixes bString by transforming the ASCII-7 string 186 * into a UTF16-LE during runtime. [all …]
|
/Zephyr-latest/samples/arch/smp/pktqueue/src/ |
D | pktqueue.c | 4 * SPDX-License-Identifier: Apache-2.0 16 if (queue->count == 0) { in phdr_desc_enqueue() 17 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() 22 queue->count++; in phdr_desc_enqueue() 23 desc->next = NULL; in phdr_desc_enqueue() 36 if (queue->count != 0) { in phdr_desc_dequeue() 37 queue->count--; in phdr_desc_dequeue() 38 return_ptr = queue->head; in phdr_desc_dequeue() [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | dlist.h | 2 * Copyright (c) 2013-2015 Wind River Systems, Inc. 4 * SPDX-License-Identifier: Apache-2.0 9 * @defgroup doubly-linked-list_apis Doubly-linked list 12 * @brief Doubly-linked list implementation 14 * Doubly-linked list implementation using inline macros/functions. 18 * The lists are expected to be initialized such that both the head and tail 38 struct _dnode *head; /* ptr to head of list (sys_dlist_t) */ member 48 * @brief Doubly-linked list structure. 52 * @brief Doubly-linked list node structure. 88 * the head. [all …]
|
D | mpsc_lockfree.h | 2 * Copyright (c) 2010-2011 Dmitry Vyukov 5 * SPDX-License-Identifier: Apache-2.0 30 * @brief A wait-free intrusive multi producer single consumer (MPSC) queue using 31 * a singly linked list. Ordering is First-In-First-Out. 33 * Based on the well known and widely used wait-free MPSC queue described by 87 mpsc_ptr_t head; member 101 .head = (struct mpsc_node *)&symbol.stub, \ 115 mpsc_ptr_set(q->head, &q->stub); in mpsc_init() 116 q->tail = &q->stub; in mpsc_init() 117 mpsc_ptr_set(q->stub.next, NULL); in mpsc_init() [all …]
|
/Zephyr-latest/tests/kernel/queue/src/ |
D | test_queue_fail.c | 4 * SPDX-License-Identifier: Apache-2.0 33 /* The sub-thread entry */ 50 * 1. Verify that the list's head is empty. 53 * sub-thread is waiting for data. 63 static qdata_t *head = NULL, *tail = &data_l[1]; in ZTEST() local 68 /* Check if the list of head is equal to null */ in ZTEST() 69 zassert_true(k_queue_append_list(&queue, (uint32_t *)head, in ZTEST() 70 (uint32_t *)tail) == -EINVAL, in ZTEST() 71 "failed to CHECKIF head == NULL"); in ZTEST() 73 head = &data_l[0]; in ZTEST() [all …]
|
/Zephyr-latest/subsys/sip_svc/ |
D | sip_svc_id_mgr.c | 2 * Copyright (c) 2022-2023, Intel Corporation. 4 * SPDX-License-Identifier: Apache-2.0 15 * Create a id key pool using size variable 0..size-1, where we can 33 id_pool->size = size; in sip_svc_id_mgr_create() 35 id_pool->id_list = k_malloc(size * sizeof(uint32_t)); in sip_svc_id_mgr_create() 36 if (!id_pool->id_list) { in sip_svc_id_mgr_create() 46 id_pool->id_mask = k_malloc(mask_size * sizeof(uint32_t)); in sip_svc_id_mgr_create() 47 if (!id_pool->id_mask) { in sip_svc_id_mgr_create() 48 k_free(id_pool->id_list); in sip_svc_id_mgr_create() 55 id_pool->id_list[i] = i; in sip_svc_id_mgr_create() [all …]
|
/Zephyr-latest/subsys/demand_paging/eviction/ |
D | lru.c | 4 * SPDX-License-Identifier: Apache-2.0 13 * - Page frames made evictable are appended to the end of the LRU queue with 18 * - When accessed, an unaccessible page causes a fault. The architecture 23 * - On page reclammation, the page at the head of the queue is removed for 24 * that purpose. The new head page is marked unaccessible. 26 * - If the new head page is actively used, it will cause a fault and be moved 28 * reclamation victim. Then the new head page is made unaccessible. 30 * This way, unused pages will migrate toward the head of the queue, used 45 * doubly-linked list with actual pointers would be wasteful as all we need 53 * The extra entry is used to store head and tail indexes. [all …]
|
/Zephyr-latest/tests/lib/lockfree/src/ |
D | test_mpsc.c | 4 * SPDX-License-Identifier: Apache-2.0 28 mpsc_ptr_t node, head; in ZTEST() local 33 head = mpsc_ptr_get(push_pop_q.head); in ZTEST() 36 next = stub->next; in ZTEST() 38 zassert_equal(head, stub, "Head should point at stub"); in ZTEST() 47 head = mpsc_ptr_get(push_pop_q.head); in ZTEST() 49 zassert_equal(head, &push_pop_nodes[0], "Queue head should point at push_pop_node"); in ZTEST() 118 for (int i = 0; i < (MPSC_ITERATIONS)*(MPSC_THREADS_NUM - 1); i++) { in mpsc_consumer() 130 spsc_acquire(node_q[nn->id]); in mpsc_consumer() 131 spsc_produce(node_q[nn->id]); in mpsc_consumer() [all …]
|
/Zephyr-latest/tests/benchmarks/data_structure_perf/dlist_perf/src/ |
D | dlist_perf.c | 4 * SPDX-License-Identifier: Apache-2.0 8 * @brief doubly-linked list tests 30 * dlist node.Appending nodes into the doubly-linked list 31 * and enumerate the doubly-linked list. 47 /* Initialize an user-defiend structure of contains dlist node */ in ZTEST() 60 /* Add into a doubly-linked list */ in ZTEST() 65 /* Enumerate the doubly-linked list */ in ZTEST() 68 zassert_true(cnode->value == count, in ZTEST() 76 /* Enumerate the doubly-linked list */ in ZTEST() 79 zassert_true(cnode->value == count, in ZTEST() [all …]
|
/Zephyr-latest/doc/kernel/data_structures/ |
D | dlist.rst | 3 Double-linked List 6 Similar to the single-linked list in many respects, Zephyr includes a 7 double-linked implementation. This provides the same algorithmic 9 constant-time removal and insertion (at all points: before or after 10 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 50 Double-linked List Internals 51 ---------------------------- 54 struct contains "head" and "tail" pointer fields, the :c:type:`sys_dnode_t` [all …]
|
D | slist.rst | 3 Single-linked List 7 singly-linked list data (i.e. data where each list element stores a 9 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 11 constant time removal of the head. Removal of subsequent nodes 35 Lists may be modified by adding a single node at the head or tail with 65 Single-linked List Internals 66 ---------------------------- 70 "head" and "tail" pointer fields. And a :c:type:`sys_snode_t` stores only a 76 :figclass: align-center [all …]
|
/Zephyr-latest/tests/unit/list/ |
D | dlist.c | 4 * SPDX-License-Identifier: Apache-2.0 148 sys_dnode_t *head, in verify_tail_head() argument 152 if (sys_dlist_peek_head(list) != head) { 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() [all …]
|
D | slist.c | 4 * SPDX-License-Identifier: Apache-2.0 149 sys_snode_t *head, in verify_tail_head() argument 153 if (sys_slist_peek_head(list) != head) { 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() [all …]
|
D | sflist.c | 4 * SPDX-License-Identifier: Apache-2.0 149 sys_sfnode_t *head, in verify_tail_head() argument 153 if (sys_sflist_peek_head(list) != head) { 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() [all …]
|
/Zephyr-latest/include/zephyr/debug/ |
D | object_tracing.h | 4 * SPDX-License-Identifier: Apache-2.0 14 * @brief Head element of the thread monitor list. 16 * @details Access the head element of the thread monitor list. 29 #define SYS_THREAD_MONITOR_NEXT(obj) (((struct k_thread *)obj)->next_thread)
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/ |
D | ull_tx_queue.h | 4 * SPDX-License-Identifier: Apache-2.0 55 * @brief Peek head tx node of tx queue. 59 * @return Head tx node of the tx queue. 68 * @return Head tx node of the tx queue.
|
/Zephyr-latest/.github/workflows/ |
D | scripts_tests.yml | 2 # SPDX-License-Identifier: Apache-2.0 9 - main 10 - v*-branch 12 - 'scripts/build/**' 13 - '.github/workflows/scripts_tests.yml' 16 - main 17 - v*-branch 19 - 'scripts/build/**' 20 - '.github/workflows/scripts_tests.yml' 23 scripts-tests: [all …]
|
/Zephyr-latest/boards/native/nrf_bsim/common/ |
D | bstests_entry.c | 2 * Copyright (c) 2017-2018 Oticon A/S 4 * SPDX-License-Identifier: Apache-2.0 34 struct bst_test_list *head = tests; in bst_add_tests() local 38 while (tail->next) { in bst_add_tests() 39 tail = tail->next; in bst_add_tests() 43 head = bs_malloc(sizeof(struct bst_test_list)); in bst_add_tests() 44 head->next = NULL; in bst_add_tests() 45 head->test_instance = (struct bst_test_instance *) 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() [all …]
|
/Zephyr-latest/kernel/ |
D | queue.c | 2 * Copyright (c) 2010-2016 Wind River Systems, Inc. 4 * SPDX-License-Identifier: Apache-2.0 10 * @brief dynamic-size QUEUE object. 36 * did a behind-the scenes memory allocation of an alloc_node in z_queue_node_peek() 43 ret = anode->data; in z_queue_node_peek() 60 sys_sflist_init(&queue->data_q); in z_impl_k_queue_init() 61 queue->lock = (struct k_spinlock) {}; in z_impl_k_queue_init() 62 z_waitq_init(&queue->wait_q); in z_impl_k_queue_init() 64 sys_dlist_init(&queue->poll_events); in z_impl_k_queue_init() 90 return z_handle_obj_poll_events(&queue->poll_events, state); in handle_poll_events() [all …]
|
/Zephyr-latest/samples/drivers/uart/native_tty/src/ |
D | main.c | 6 * SPDX-License-Identifier: Apache-2.0 35 printk("Device %s sent: \"%s\"\n", uart->name, str); in send_str() 40 char *head = str; in recv_str() local 44 *head++ = c; in recv_str() 46 *head = '\0'; in recv_str() 48 printk("Device %s received: \"%s\"\n", uart->name, str); in recv_str() 58 while (i--) { in main() 59 snprintf(send_buf, 64, "Hello from device %s, num %d", uart0->name, i); in main() 73 printk("Could not configure device %s", uart0->name); in main() 77 printk("Could not configure device %s", uart2->name); in main() [all …]
|
/Zephyr-latest/include/zephyr/drivers/dma/ |
D | dma_mcux_pxp.h | 2 * Copyright 2023-2024 NXP 4 * SPDX-License-Identifier: Apache-2.0 21 * head block source address: input buffer address 22 * head block destination address: output buffer address
|