List of intrusive nodes. More...
#include <cmsis-plus/utils/lists.h>
Inheritance diagram for os::utils::intrusive_list< T, N, MP, U >:Public Types | |
| using | difference_type = ptrdiff_t |
| using | iterator = intrusive_list_iterator< T, N, MP, U > |
| using | iterator_pointer = N * |
| Type of reference to the iterator internal pointer. | |
| using | pointer = U * |
| using | reference = U & |
| using | value_type = U |
Public Member Functions | |
Constructors & Destructor | |
| intrusive_list () | |
| Construct an intrusive list. | |
| intrusive_list (bool clr) | |
| Construct an intrusive list with controlled inits. | |
| ~intrusive_list () | |
| Destruct the list. | |
Public Member Functions | |
| void | link (reference node) |
| Add a node to the tail of the list. | |
| iterator | begin () |
| Iterator begin. | |
| iterator | end () const |
| Iterator begin. | |
| pointer | unlink_head (void) |
| Unlink the first element from the list. | |
| pointer | unlink_tail (void) |
| Unlink the last element from the list. | |
Public Member Functions | |
| bool | uninitialized (void) const |
| Check if the list is uninitialised. | |
| void | clear (void) |
| Clear the list. | |
| bool | empty (void) const |
| Check if the list is empty. | |
| volatile static_double_list_links * | head (void) const |
| Get the list head. | |
| volatile static_double_list_links * | tail (void) const |
| Get the list tail. | |
Protected Member Functions | |
| pointer | get_pointer (iterator_pointer node) const |
Private Member Functions | |
| void | insert_after (static_double_list_links &node, static_double_list_links *after) |
| Insert a new node after existing node. | |
Protected Attributes | |
Private Member Variables | |
| static_double_list_links | head_ |
| A list node used to point to head and tail. | |
| T | Type of object that includes the intrusive node. |
| N | Type of intrusive node. Must have the public members prev & next. |
| MP | Name of the intrusive node member in object T. |
| U | Type stored in the list, derived from T. |
| using os::utils::intrusive_list< T, N, MP, U >::difference_type = ptrdiff_t |
| using os::utils::intrusive_list< T, N, MP, U >::iterator = intrusive_list_iterator<T, N, MP, U> |
| using os::utils::intrusive_list< T, N, MP, U >::iterator_pointer = N* |
| using os::utils::intrusive_list< T, N, MP, U >::pointer = U* |
| using os::utils::intrusive_list< T, N, MP, U >::reference = U& |
| using os::utils::intrusive_list< T, N, MP, U >::value_type = U |
|
inline |
|
inline |
|
inline |
|
inline |
const because it may initialise on first use. Definition at line 1185 of file lists.h.
|
inherited |
Initialise the mandatory node with links to itself.
Definition at line 108 of file lists.cpp.
References os::utils::static_double_list::head_, os::utils::static_double_list_links::next(), and os::utils::static_double_list_links::prev().
Referenced by os::utils::double_list::double_list(), os::rtos::internal::ready_threads_list::link(), and os::rtos::internal::terminated_threads_list::link().
|
inlineinherited |
| true | The list has no nodes. |
| false | The list has at least one node. |
Definition at line 1001 of file lists.h.
References os::utils::static_double_list::head_, and os::utils::static_double_list_links::next().
Referenced by os::utils::double_list::~double_list(), os::rtos::internal::clock_timestamps_list::check_timestamp(), os::rtos::internal::clock_timestamps_list::link(), os::rtos::internal::ready_threads_list::link(), os::rtos::internal::waiting_threads_list::link(), os::rtos::internal::waiting_threads_list::resume_one(), and os::rtos::internal::ready_threads_list::unlink_head().
|
inline |
|
inlineprotected |
Definition at line 1207 of file lists.h.
|
inlineinherited |
Definition at line 1008 of file lists.h.
References os::utils::static_double_list::head_, and os::utils::static_double_list_links::next().
|
protectedinherited |
| node | Reference to node to insert. |
| after | Reference to existing node. |
Definition at line 121 of file lists.cpp.
References os::utils::static_double_list_links::next(), os::utils::static_double_list_links::prev(), and os::trace::printf().
Referenced by os::rtos::internal::thread_children_list::link(), os::rtos::internal::clock_timestamps_list::link(), os::rtos::internal::ready_threads_list::link(), os::rtos::internal::waiting_threads_list::link(), and os::rtos::internal::terminated_threads_list::link().
| void os::utils::intrusive_list< T, N, MP, U >::link | ( | reference | node | ) |
| [in] | node | Reference to a list node. |
Definition at line 1155 of file lists.h.
|
inlineinherited |
Definition at line 1014 of file lists.h.
References os::utils::static_double_list::head_, and os::utils::static_double_list_links::prev().
Referenced by os::rtos::internal::thread_children_list::link(), os::rtos::internal::clock_timestamps_list::link(), os::rtos::internal::ready_threads_list::link(), os::rtos::internal::waiting_threads_list::link(), and os::rtos::internal::terminated_threads_list::link().
|
inlineinherited |
| true | The list was not initialised. |
| false | The list was initialised. |
Definition at line 994 of file lists.h.
References os::utils::static_double_list::head_, and os::utils::static_double_list_links::prev().
| intrusive_list< T, N, MP, U >::pointer os::utils::intrusive_list< T, N, MP, U >::unlink_head | ( | void | ) |
Definition at line 1225 of file lists.h.
References link().
| intrusive_list< T, N, MP, U >::pointer os::utils::intrusive_list< T, N, MP, U >::unlink_tail | ( | void | ) |
|
protectedinherited |
To simplify processing, the list always has a node.
Definition at line 473 of file lists.h.
Referenced by os::rtos::internal::waiting_threads_list::begin(), os::rtos::internal::clock_timestamps_list::check_timestamp(), os::utils::static_double_list::clear(), os::utils::static_double_list::empty(), os::rtos::internal::waiting_threads_list::end(), os::utils::static_double_list::head(), os::rtos::internal::clock_timestamps_list::link(), os::rtos::internal::ready_threads_list::link(), os::rtos::internal::waiting_threads_list::link(), os::rtos::internal::terminated_threads_list::link(), os::utils::static_double_list::tail(), and os::utils::static_double_list::uninitialized().