13#if defined(OS_USE_OS_APP_CONFIG_H) 
   14#include <cmsis-plus/os-app-config.h> 
   24#pragma clang diagnostic ignored "-Wc++98-compat" 
   64#if defined(OS_TRACE_RTOS_LISTS) 
   68        else if (prio <= after->thread_->priority ())
 
   71#if defined(OS_TRACE_RTOS_LISTS) 
   76        else if (prio > 
head ()->thread_->priority ())
 
   78#pragma GCC diagnostic push 
   80#elif defined(__GNUC__) 
   81#pragma GCC diagnostic ignored "-Wuseless-cast" 
   86#pragma GCC diagnostic pop 
   88#if defined(OS_TRACE_RTOS_LISTS) 
   90                           head ()->thread_->priority ());
 
   95#pragma GCC diagnostic push 
   97#elif defined(__GNUC__) 
   98#pragma GCC diagnostic ignored "-Wuseless-cast" 
  108#pragma GCC diagnostic pop 
  110#if defined(OS_TRACE_RTOS_LISTS) 
  132#if defined(OS_TRACE_RTOS_LISTS) 
  138        assert (th != 
nullptr);
 
  203#if defined(OS_TRACE_RTOS_LISTS) 
  207        else if (prio <= after->thread_->priority ())
 
  210#if defined(OS_TRACE_RTOS_LISTS) 
  215        else if (prio > 
head ()->thread_->priority ())
 
  217#pragma GCC diagnostic push 
  218#if defined(__clang__) 
  219#elif defined(__GNUC__) 
  220#pragma GCC diagnostic ignored "-Wuseless-cast" 
  225#pragma GCC diagnostic pop 
  227#if defined(OS_TRACE_RTOS_LISTS) 
  229                           head ()->thread_->priority ());
 
  234#pragma GCC diagnostic push 
  235#if defined(__clang__) 
  236#elif defined(__GNUC__) 
  237#pragma GCC diagnostic ignored "-Wuseless-cast" 
  247#pragma GCC diagnostic pop 
  249#if defined(OS_TRACE_RTOS_LISTS) 
  283        assert (th != 
nullptr);
 
  292#if defined(OS_TRACE_RTOS_LISTS) 
  312#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  319#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  332#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  339#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  360#if !defined(OS_USE_RTOS_PORT_TIMER) 
  367#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  374#if defined(OS_TRACE_RTOS_LISTS_CONSTRUCT) 
  387        tmr.internal_interrupt_service_routine ();
 
  408#pragma GCC diagnostic push 
  409#if defined(__clang__) 
  410#elif defined(__GNUC__) 
  411#pragma GCC diagnostic ignored "-Wnull-dereference" 
  424#if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 
  426                static_cast<uint32_t
> (timestamp));
 
  432#if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 
  434                static_cast<uint32_t
> (after->
timestamp),
 
  435                static_cast<uint32_t
> (timestamp));
 
  438        else if (timestamp < 
head ()->timestamp)
 
  440#pragma GCC diagnostic push 
  441#if defined(__clang__) 
  442#elif defined(__GNUC__) 
  443#pragma GCC diagnostic ignored "-Wuseless-cast" 
  449#if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 
  451                static_cast<uint32_t
> (timestamp),
 
  452                static_cast<uint32_t
> (
head ()->timestamp));
 
  454#pragma GCC diagnostic pop 
  460            while (timestamp < after->timestamp)
 
  462#pragma GCC diagnostic push 
  463#if defined(__clang__) 
  464#elif defined(__GNUC__) 
  465#pragma GCC diagnostic ignored "-Wuseless-cast" 
  470#if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 
  472                static_cast<uint32_t
> (after->
timestamp),
 
  473                static_cast<uint32_t
> (timestamp));
 
  475#pragma GCC diagnostic pop 
  480#pragma GCC diagnostic pop 
  509#pragma GCC diagnostic push 
  510#if defined(__clang__) 
  511#elif defined(__GNUC__) 
  512#pragma GCC diagnostic ignored "-Wnull-dereference" 
  515#pragma GCC diagnostic pop 
  518#if defined(OS_TRACE_RTOS_LISTS_CLOCKS) 
  546#if defined(OS_TRACE_RTOS_THREAD) 
virtual timestamp_t now(void)
Tell the current time, possibly adjusted for epoch.
 
void check_timestamp(port::clock::timestamp_t now)
Check list time stamps.
 
volatile timestamp_node * head(void) const
Get list head.
 
void link(timestamp_node &node)
Add a new thread node to the list.
 
const char * name(void) const
Get object name.
 
thread * unlink_head(void)
Remove the top node from the list.
 
volatile waiting_thread_node * head(void) const
Get list head.
 
void link(waiting_thread_node &node)
Add a new thread node to the list.
 
void link(waiting_thread_node &node)
Add a new thread node to the list.
 
void link(thread &thread)
Add a new thread node to the list.
 
Double linked list node, with time stamp and thread.
 
timeout_thread_node(port::clock::timestamp_t ts, thread &th)
Construct a clock timeout node.
 
rtos::thread & thread
Reference to thread who initiated the timeout.
 
virtual ~timeout_thread_node() override
Destruct the node.
 
virtual void action(void) override
Action to perform when the time stamp is reached.
 
timer & tmr
Reference to waiting timer.
 
virtual void action(void) override
Action to perform when the time stamp is reached.
 
timer_node(port::clock::timestamp_t ts, timer &tm)
Construct a clock timer node.
 
virtual ~timer_node() override
Destruct the node.
 
Double linked list node, with time stamp.
 
port::clock::timestamp_t timestamp
Time stamp when the next action will be performed.
 
virtual ~timestamp_node()
Destruct the node.
 
timestamp_node(port::clock::timestamp_t ts)
Construct a node with a time stamp.
 
Double linked list node, with thread reference.
 
rtos::thread * thread_
Pointer to waiting thread.
 
void link(waiting_thread_node &node)
Add a new thread node to the list.
 
bool resume_one(void)
Wake-up one thread (the oldest with the highest priority)
 
volatile waiting_thread_node * head(void) const
Get list head.
 
void resume_all(void)
Wake-up all threads in the list.
 
Interrupts critical section RAII helper.
 
POSIX compliant thread, using the default RTOS allocator.
 
uint8_t state_t
Type of variables holding thread states.
 
result_t priority(priority_t prio)
Set the assigned scheduling priority.
 
void resume(void)
Resume the thread.
 
state_t state(void) const
Get thread scheduler state.
 
User single-shot or periodic timer.
 
Statically allocated core of a double linked list, pointers to next, previous.
 
static_double_list_links * next(void) const
 
static_double_list_links * prev(void) const
 
void unlink(void)
Remove the node from the list.
 
static_double_list_links head_
A list node used to point to head and tail.
 
void insert_after(static_double_list_links &node, static_double_list_links *after)
Insert a new node after existing node.
 
bool empty(void) const
Check if the list is empty.
 
void clear(void)
Clear the list.
 
volatile static_double_list_links * tail(void) const
Get the list tail.
 
int printf(const char *format,...)
Write a formatted string to the trace device.
 
int unlink(const char *name)
 
port::clock::timestamp_t timestamp_t
Type of variables holding clock time stamps.
 
clock_systick sysclock
The system clock object instance.
 
uint8_t priority_t
Type of variables holding thread priorities.
 
Single file µOS++ RTOS definitions.
 
@ running
Has the CPU and runs.
 
@ destroyed
Terminated and resources (like stack) released.
 
@ terminated
No longer usable, but resources not yet released.
 
@ ready
Present in the READY list and competing for CPU.