45 const_cast<utils::static_double_list_links*> (
tail ()));
67 #if defined(OS_TRACE_RTOS_LISTS) 71 else if (prio <= after->thread_->priority ())
74 #if defined(OS_TRACE_RTOS_LISTS) 79 else if (prio >
head ()->thread_->priority ())
84 #if defined(OS_TRACE_RTOS_LISTS) 86 head ()->thread_->priority ());
99 #if defined(OS_TRACE_RTOS_LISTS) 121 #if defined(OS_TRACE_RTOS_LISTS) 127 assert (th !=
nullptr);
192 #if defined(OS_TRACE_RTOS_LISTS) 196 else if (prio <= after->thread_->priority ())
199 #if defined(OS_TRACE_RTOS_LISTS) 204 else if (prio >
head ()->thread_->priority ())
209 #if defined(OS_TRACE_RTOS_LISTS) 211 head ()->thread_->priority ());
224 #if defined(OS_TRACE_RTOS_LISTS) 254 th =
head ()->thread_;
258 assert (th !=
nullptr);
267 #if defined(OS_TRACE_RTOS_LISTS) 278 while (resume_one ())
287 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 294 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 307 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 314 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 335 #if !defined(OS_USE_RTOS_PORT_TIMER) 342 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 349 #if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 362 tmr.internal_interrupt_service_routine ();
394 #if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 396 static_cast<uint32_t> (timestamp));
402 #if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 404 static_cast<uint32_t> (after->
timestamp),
405 static_cast<uint32_t> (timestamp));
408 else if (timestamp < head ()->timestamp)
414 #if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 416 static_cast<uint32_t> (timestamp),
417 static_cast<uint32_t> (head ()->timestamp));
424 while (timestamp < after->timestamp)
429 #if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 431 static_cast<uint32_t> (after->
timestamp),
432 static_cast<uint32_t> (timestamp));
436 insert_after (node, after);
449 if (head_.next () ==
nullptr)
469 #if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 488 if (head_.prev () ==
nullptr)
497 #if defined(OS_TRACE_RTOS_THREAD) 504 insert_after (node, after);
Terminated and resources (like stack) released.
port::clock::timestamp_t timestamp
Time stamp when the next action will be performed.
port::clock::timestamp_t timestamp_t
Type of variables holding clock time stamps.
void link(timestamp_node &node)
Add a new thread node to the list.
timestamp_node(port::clock::timestamp_t ts)
Construct a node with a time stamp.
rtos::thread & thread
Reference to thread who initiated the timeout.
static_double_list_links * prev(void) const
void resume_all(void)
Wake-up all threads in the list.
Ask for flags to be cleared after read.
Double linked list node, with thread reference.
uint8_t state_t
Type of variables holding thread states.
virtual ~timestamp_node()
Destruct the node.
Statically allocated core of a double linked list, pointers to next, previous.
Interrupts critical section RAII helper.
volatile static_double_list_links * head(void) const
Get the list head.
timeout_thread_node(port::clock::timestamp_t ts, thread &th)
Construct a clock timeout node.
timer_node(port::clock::timestamp_t ts, timer &tm)
Construct a clock timer node.
Double linked list node, with time stamp and thread.
void link(thread &thread)
Add a new thread node to the list.
User single-shot or periodic timer.
rtos::thread * thread_
Pointer to waiting thread.
void insert_after(static_double_list_links &node, static_double_list_links *after)
Insert a new node after existing node.
void link(waiting_thread_node &node)
Add a new thread node to the list.
void clear(void)
Clear the list.
volatile static_double_list_links * tail(void) const
Get the list tail.
Present in the READY list and competing for CPU.
virtual ~timeout_thread_node() override
Destruct the node.
virtual ~timer_node() override
Destruct the node.
const char * name(void) const
Get object name.
uint8_t priority_t
Type of variables holding thread priorities.
POSIX compliant thread, using the default RTOS allocator.
void link(waiting_thread_node &node)
Add a new thread node to the list.
state_t state(void) const
Get thread scheduler state.
bool resume_one(void)
Wake-up one thread (the oldest with the highest priority)
Single file µOS++ RTOS definitions.
clock_systick sysclock
The system clock object instance.
int printf(const char *format,...)
Write a formatted string to the trace device.
int unlink(const char *name)
virtual void action(void) override
Action to perform when the time stamp is reached.
static_double_list_links head_
A list node used to point to head and tail.
thread * unlink_head(void)
Remove the top node from the list.
virtual void action(void) override
Action to perform when the time stamp is reached.
bool empty(void) const
Check if the list is empty.
result_t priority(priority_t prio)
Set the assigned scheduling priority.
void check_timestamp(port::clock::timestamp_t now)
Check list time stamps.
timer & tmr
Reference to waiting timer.
void unlink(void)
Remove the node from the list.
Double linked list node, with time stamp.
No longer usable, but resources not yet released.
void resume(void)
Resume the thread.
void link(waiting_thread_node &node)
Add a new thread node to the list.
virtual timestamp_t now(void)
Tell the current time, possibly adjusted for epoch.