Ordered list of time stamp nodes. More...
#include <os-lists.h>
Inheritance diagram for os::rtos::internal::clock_timestamps_list:Public Member Functions | |
Constructors & Destructor | |
| clock_timestamps_list () | |
| Construct a list of clock time stamps. | |
| ~clock_timestamps_list () | |
| Destruct the list. | |
Public Member Functions | |
| void | link (timestamp_node &node) |
| Add a new thread node to the list. | |
| volatile timestamp_node * | head (void) const |
| Get list head. | |
| void | check_timestamp (port::clock::timestamp_t now) |
| Check list time stamps. | |
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 * | tail (void) const |
| Get the list tail. | |
Protected Member Functions | |
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. | |
Definition at line 665 of file os-lists.h.
|
inline |
Definition at line 957 of file os-lists.h.
|
inline |
Definition at line 961 of file os-lists.h.
| void os::rtos::internal::clock_timestamps_list::check_timestamp | ( | port::clock::timestamp_t | now | ) |
| [in] | now | The current clock time stamp. |
With the list ordered, check if the list head time stamp was reached and run the node action.
Repeat for all nodes that have overdue time stamps.
Definition at line 490 of file os-lists.cpp.
References os::utils::static_double_list::empty(), head(), os::utils::static_double_list::head_, os::utils::static_double_list_links::next(), os::rtos::clock::now(), os::trace::printf(), os::rtos::sysclock, and os::rtos::internal::timestamp_node::timestamp.
|
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(), check_timestamp(), 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 |
Definition at line 966 of file os-lists.h.
Referenced by check_timestamp(), and link().
|
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(), 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::rtos::internal::clock_timestamps_list::link | ( | timestamp_node & | node | ) |
| [in] | node | Reference to a list node. |
The list is kept in ascending time stamp order.
Based on time stamp, the node is inserted
To satisfy the circular double linked list requirements, an empty list still contains the head node with references to itself.
Definition at line 413 of file os-lists.cpp.
References os::utils::static_double_list::empty(), head(), os::utils::static_double_list::head_, os::utils::static_double_list::insert_after(), os::utils::static_double_list_links::prev(), os::trace::printf(), os::utils::static_double_list::tail(), and os::rtos::internal::timestamp_node::timestamp.
|
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(), 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().
|
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(), 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(), 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().