Doubly-linked list primitives used by scheduler and timers.
More...
#include "config.h"
#include "list.h"
Go to the source code of this file.
|
| void | akos_list_init (list_t *const p_list) |
| | Initialize list sentinel and metadata.
|
| void | akos_list_item_init (list_item_t *const p_list_item) |
| | Initialize list item ownership metadata.
|
| void | akos_list_insert_end (list_t *const p_list, list_item_t *const p_list_item) |
| | Insert item at end of list.
|
| list_item_t * | akos_list_item_get_next (list_item_t *p_list_item) |
| | Get next item, skipping list end marker.
|
| list_item_t * | akos_list_item_get_prev (list_item_t *p_list_item) |
| | Get previous item, skipping list end marker.
|
| void | akos_list_insert (list_t *const p_list, list_item_t *const p_list_item) |
| | Insert item by ascending item value.
|
| uint16_t | akos_list_remove (list_item_t *const p_list_item) |
| | Remove item from its containing list.
|
| void * | akos_list_get_owner_of_next_item (list_t *const p_list) |
| | Round-robin helper to get owner of next list item.
|
Doubly-linked list primitives used by scheduler and timers.
- Author
- Snoopy3921 - AK Foundation
- Date
- 2026/05/08
Definition in file list.c.
◆ akos_list_get_owner_of_next_item()
| void * akos_list_get_owner_of_next_item |
( |
list_t *const | p_list | ) |
|
Round-robin helper to get owner of next list item.
Get owner of next item and advance list cursor.
- Parameters
-
- Returns
- Owner pointer of next item.
Definition at line 169 of file list.c.
◆ akos_list_init()
| void akos_list_init |
( |
list_t *const | p_list | ) |
|
Initialize list sentinel and metadata.
Initialize list metadata and sentinel.
- Parameters
-
Definition at line 20 of file list.c.
◆ akos_list_insert()
| void akos_list_insert |
( |
list_t *const | p_list, |
|
|
list_item_t *const | p_list_item ) |
Insert item by ascending item value.
Insert item in ascending order by list_item::value.
- Parameters
-
| p_list | Destination list. |
| p_list_item | Item to insert. |
Definition at line 104 of file list.c.
◆ akos_list_insert_end()
| void akos_list_insert_end |
( |
list_t *const | p_list, |
|
|
list_item_t *const | p_list_item ) |
Insert item at end of list.
Insert item at list tail.
- Parameters
-
| p_list | Destination list. |
| p_list_item | Item to insert. |
Definition at line 45 of file list.c.
◆ akos_list_item_get_next()
| list_item_t * akos_list_item_get_next |
( |
list_item_t * | p_list_item | ) |
|
Get next item, skipping list end marker.
Get next list item.
- Parameters
-
| p_list_item | Current list item. |
- Returns
- Next item in list.
Definition at line 79 of file list.c.
◆ akos_list_item_get_prev()
| list_item_t * akos_list_item_get_prev |
( |
list_item_t * | p_list_item | ) |
|
Get previous item, skipping list end marker.
Get previous list item.
- Parameters
-
| p_list_item | Current list item. |
- Returns
- Previous item in list.
Definition at line 91 of file list.c.
◆ akos_list_item_init()
| void akos_list_item_init |
( |
list_item_t *const | p_list_item | ) |
|
Initialize list item ownership metadata.
Initialize list item linkage and ownership metadata.
- Parameters
-
Definition at line 35 of file list.c.
◆ akos_list_remove()
| uint16_t akos_list_remove |
( |
list_item_t *const | p_list_item | ) |
|
Remove item from its containing list.
Remove item from containing list.
- Parameters
-
| p_list_item | Item to remove. |
- Returns
- Remaining number of items in the list.
Definition at line 141 of file list.c.