µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.
os-c-decls.h
Go to the documentation of this file.
1 /*
2  * This file is part of the µOS++ distribution.
3  * (https://github.com/micro-os-plus)
4  * Copyright (c) 2016 Liviu Ionescu.
5  *
6  * Permission is hereby granted, free of charge, to any person
7  * obtaining a copy of this software and associated documentation
8  * files (the "Software"), to deal in the Software without
9  * restriction, including without limitation the rights to use,
10  * copy, modify, merge, publish, distribute, sublicense, and/or
11  * sell copies of the Software, and to permit persons to whom
12  * the Software is furnished to do so, subject to the following
13  * conditions:
14  *
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  */
27 
28 /*
29  * The structures declared in this file are used both in the C API
30  * and in the legacy CMSIS API.
31  *
32  * Since there is no method to automatically sync them with the C++
33  * definitions, they must be manually adjusted to match them, otherwise
34  * the validation checks in os-c-wrapper.cpp will fail.
35  */
36 
37 #ifndef CMSIS_PLUS_RTOS_OS_C_DECLS_H_
38 #define CMSIS_PLUS_RTOS_OS_C_DECLS_H_
39 
40 // ----------------------------------------------------------------------------
41 
42 #include <cmsis-plus/os-versions.h>
43 
44 #include <cmsis-plus/os-app-config.h>
45 #include <cmsis-plus/rtos/port/os-decls.h>
46 
47 #include <stdint.h>
48 #include <stddef.h>
49 #include <stdbool.h>
50 
51 // ----------------------------------------------------------------------------
52 
53 #ifdef __cplusplus
54 extern "C"
55 {
56 #endif
57 
58  // ==========================================================================
59 
61  {
62  void* prev;
63  void* next;
65 
67 
69  {
72 
74  {
76  void* thread;
78 
80  {
83 
100  typedef uint32_t os_result_t;
101 
113  typedef uint32_t os_flags_mode_t;
114 
126  typedef uint32_t os_flags_mask_t;
127 
133  enum
134  {
138  };
139 
143 #define os_flags_any 0
144 
148 #define os_flags_all 0xFFFFFFFF
149 
150  // --------------------------------------------------------------------------
151 
162  typedef os_port_scheduler_state_t os_sched_state_t;
163 
176  typedef os_port_irq_state_t os_irq_state_t;
177 
178  // --------------------------------------------------------------------------
179 
180  // Define clock types based on port definitions.
181 
191  typedef os_port_clock_timestamp_t os_clock_timestamp_t;
192 
202  typedef os_port_clock_duration_t os_clock_duration_t;
203 
214  typedef os_port_clock_offset_t os_clock_offset_t;
215 
216  // --------------------------------------------------------------------------
217 
228  typedef void* os_iterator_t;
229 
230  // --------------------------------------------------------------------------
231 
237  typedef uint64_t os_statistics_counter_t;
238 
244  typedef uint64_t os_statistics_duration_t;
245 
255  typedef struct os_internal_evflags_s
256  {
257  os_flags_mask_t flags_mask;
259 
260  // ==========================================================================
261 #define OS_THREAD_PRIO_SHIFT (4)
262 
273  enum
274  {
275  // Ordered, with **none** as the first and **error** as the last.
276  os_thread_priority_none = 0, // not defined
288  };
289 
295  enum
296  {
321  };
322 
331  typedef void* os_thread_func_args_t;
332 
342  typedef void*
343  (*os_thread_func_t) (os_thread_func_args_t args);
344 
350  typedef uint8_t os_thread_state_t;
351 
364  typedef uint8_t os_thread_prio_t;
365 
366  // --------------------------------------------------------------------------
367 
377  typedef os_port_thread_stack_element_t os_thread_stack_element_t;
378 
387  typedef os_port_thread_stack_allocation_element_t os_thread_stack_allocation_element_t;
388 
389 #pragma GCC diagnostic push
390 #pragma GCC diagnostic ignored "-Wpadded"
391 
402  typedef struct os_thread_stack_s
403  {
408  void* stack_addr;
409  size_t stack_size_bytes;
410 
416 
427  typedef struct os_thread_context_s
428  {
434 #if !defined(OS_USE_RTOS_PORT_SCHEDULER)
435  os_port_thread_context_t port;
436 #endif
437 
443 
444 #if defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES) \
445  || defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES)
446 
457  typedef struct os_thread_statistics_s
458  {
463 #if defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES)
464  os_statistics_counter_t context_switches;
465 #endif /* defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES) */
466 
467 #if defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES)
468  os_statistics_duration_t cpu_cycles;
469 #endif /* defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES) */
470 
476 
477 #endif
478 
489  typedef struct os_thread_attr_s
490  {
500  void* clock;
501 
509 
523 
534  os_thread_prio_t th_priority;
535 
537 
554  typedef struct os_thread_s
555  {
560  void* vtbl;
561  const char* name;
562  int errno_; // Prevent the macro to expand (for example with a prefix).
564  os_thread_func_t func;
565  os_thread_func_args_t func_args;
566  void* func_result_;
567  void* parent;
571  void* joiner;
572  void* waiting_node;
573  void* clock_node;
574  void* clock;
575  void* allocator;
576  void* allocted_stack_address;
577  size_t acquired_mutexes;
578  size_t allocated_stack_size_elements;
579  os_thread_state_t state;
580  os_thread_prio_t prio_assigned;
581  os_thread_prio_t prio_inherited;
582  bool interrupted;
583  os_internal_evflags_t event_flags;
584 #if defined(OS_INCLUDE_RTOS_CUSTOM_THREAD_USER_STORAGE)
585  os_thread_user_storage_t user_storage; //
586 #endif /* defined(OS_INCLUDE_RTOS_CUSTOM_THREAD_USER_STORAGE) */
587 
588 #if defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES) \
589  || defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES)
590  os_thread_statistics_t statistics;
591 #endif /* defined(OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES) */
592 
593 #if defined(OS_USE_RTOS_PORT_SCHEDULER)
594  os_thread_port_data_t port;
595 #endif
596  os_thread_context_t context;
597 
602  } os_thread_t;
603 
604 #pragma GCC diagnostic pop
605 
610  // ==========================================================================
616 #pragma GCC diagnostic push
617 #pragma GCC diagnostic ignored "-Wpadded"
618 
631  typedef struct os_clock_s
632  {
637  void* vtbl;
638  const char* name;
640  os_clock_duration_t sleep_count;
641  os_clock_timestamp_t steady_count;
642 
647  } os_clock_t;
648 
649 #pragma GCC diagnostic pop
650 
655  // ==========================================================================
656 #pragma GCC diagnostic push
657 #pragma GCC diagnostic ignored "-Wpadded"
658 
659  typedef struct os_clock_node_s
660  {
661  void* next;
662  void* prev;
663  void* list;
664  os_clock_timestamp_t timestamp;
665  void* timer;
667 
668 #pragma GCC diagnostic pop
669 
678  enum
679  {
682  };
683 
693  typedef void* os_timer_func_args_t;
694 
704  typedef void
705  (*os_timer_func_t) (os_timer_func_args_t args);
706 
712  typedef uint8_t os_timer_type_t;
713 
719  typedef uint8_t os_timer_state_t;
720 
721 #pragma GCC diagnostic push
722 #pragma GCC diagnostic ignored "-Wpadded"
723 
734  typedef struct os_timer_attr_s
735  {
739  void* clock;
740 
744  os_timer_type_t tm_type;
745 
746  } os_timer_attr_t;
747 
764  typedef struct os_timer_s
765  {
770  const char* name;
771  os_timer_func_t func;
772  os_timer_func_args_t func_args;
773 #if !defined(OS_USE_RTOS_PORT_TIMER)
774  void* clock;
776  os_clock_duration_t period;
777 #endif
778 #if defined(OS_USE_RTOS_PORT_TIMER)
779  os_timer_port_data_t port_;
780 #endif
781  os_timer_type_t type;
782  os_timer_state_t state;
783 
788  } os_timer_t;
789 
790 #pragma GCC diagnostic pop
791 
796  // ==========================================================================
797  typedef int16_t os_mutex_count_t;
798  typedef uint8_t os_mutex_type_t;
799  typedef uint8_t os_mutex_protocol_t;
800  typedef uint8_t os_mutex_robustness_t;
801 
812  enum
813  {
818 
823 
828 
833  };
834 
840  enum
841  {
846 
851 
856  };
857 
863  enum
864  {
869 
874 
879 
884  };
885 
886 #pragma GCC diagnostic push
887 #pragma GCC diagnostic ignored "-Wpadded"
888 
899  typedef struct os_mutex_attr_s
900  {
904  void* clock;
905 
909  os_thread_prio_t mx_priority_ceiling;
910 
914  os_mutex_protocol_t mx_protocol;
915 
919  os_mutex_robustness_t mx_robustness;
920 
924  os_mutex_type_t mx_type;
925 
929  os_mutex_count_t mx_max_count;
930 
931  } os_mutex_attr_t;
932 
949  typedef struct os_mutex_s
950  {
955  const char* name;
956  void* owner;
957 #if !defined(OS_USE_RTOS_PORT_MUTEX)
958  os_internal_threads_waiting_list_t list;
959  void* clock;
960 #endif
962 #if defined(OS_USE_RTOS_PORT_MUTEX)
963  os_mutex_port_data_t port;
964 #endif
965  os_mutex_count_t count;
966  os_thread_prio_t initial_prio_ceiling;
967  os_thread_prio_t prio_ceiling;
968  os_thread_prio_t bosted_prio;
969  bool owner_dead;
970  bool consistent;
971  bool recoverable;
972  os_mutex_type_t type;
973  os_mutex_protocol_t protocol;
974  os_mutex_robustness_t robustness;
975  os_mutex_count_t max_count;
976 
981  } os_mutex_t;
982 
983 #pragma GCC diagnostic pop
984 
989  // ==========================================================================
1005  typedef struct os_condvar_attr_s
1006  {
1010  void* clock;
1011 
1013 
1031  typedef struct os_condvar_s
1032  {
1037  const char* name;
1038 #if !defined(OS_USE_RTOS_PORT_CONDITION_VARIABLE)
1039  os_internal_threads_waiting_list_t list;
1040  // void* clock;
1041 #endif
1042 
1047  } os_condvar_t;
1048 
1053  // ==========================================================================
1064  typedef int16_t os_semaphore_count_t;
1065 
1066 #pragma GCC diagnostic push
1067 #pragma GCC diagnostic ignored "-Wpadded"
1068 
1079  typedef struct os_semaphore_attr_s
1080  {
1084  void* clock;
1085 
1089  os_semaphore_count_t sm_max_value;
1090 
1094  os_semaphore_count_t sm_initial_value;
1095 
1097 
1114  typedef struct os_semaphore_s
1115  {
1120  const char* name;
1121 #if !defined(OS_USE_RTOS_PORT_SEMAPHORE)
1122  os_internal_threads_waiting_list_t list;
1123  void* clock;
1124 #endif
1125 #if defined(OS_USE_RTOS_PORT_SEMAPHORE)
1126  os_semaphore_port_data_t port;
1127 #endif
1128  os_semaphore_count_t initial_count;
1129  os_semaphore_count_t count;
1130  os_semaphore_count_t max_count;
1131 
1136  } os_semaphore_t;
1137 
1138 #pragma GCC diagnostic pop
1139 
1144  // ==========================================================================
1145  typedef uint16_t os_mempool_size_t;
1146 
1152 #pragma GCC diagnostic push
1153 #pragma GCC diagnostic ignored "-Wpadded"
1154 
1165  typedef struct os_mempool_attr_s
1166  {
1170  void* clock;
1171 
1176 
1181 
1183 
1200  typedef struct os_mempool_s
1201  {
1206  void* vtbl;
1207  const char* name;
1208 #if !defined(OS_USE_RTOS_PORT_MEMORY_POOL)
1209  os_internal_threads_waiting_list_t list;
1210  void* clock;
1211 #endif
1212  void* pool_addr;
1213  void* allocated_pool_addr;
1214  void* allocator;
1215 #if defined(OS_USE_RTOS_PORT_MEMORY_POOL)
1216  os_mempool_port_data_t port;
1217 #endif
1218  size_t pool_size_bytes;
1219  size_t allocated_pool_size_elements_;
1220  os_mempool_size_t blocks;
1221  os_mempool_size_t block_size_bytes;
1222  os_mempool_size_t count;
1223  void* first;
1224 
1229  } os_mempool_t;
1230 
1231 #pragma GCC diagnostic pop
1232 
1237  // ==========================================================================
1238 #if defined(OS_BOOL_RTOS_MESSAGE_QUEUE_SIZE_16BITS)
1239  typedef uint16_t os_mqueue_size_t;
1240 #else
1241  typedef uint8_t os_mqueue_size_t;
1242 #endif
1243 
1244  typedef uint16_t os_mqueue_msg_size_t;
1245  typedef os_mqueue_size_t os_mqueue_index_t;
1246 
1257  typedef uint8_t os_mqueue_prio_t;
1258 
1259 #pragma GCC diagnostic push
1260 #pragma GCC diagnostic ignored "-Wpadded"
1261 
1272  typedef struct os_mqueue_attr_s
1273  {
1277  void* clock;
1278 
1283 
1288 
1289  } os_mqueue_attr_t;
1290 
1307  typedef struct os_mqueue_s
1308  {
1313  void* vtbl;
1314  const char* name;
1315 #if !defined(OS_USE_RTOS_PORT_MESSAGE_QUEUE)
1316  os_internal_threads_waiting_list_t send_list;
1317  os_internal_threads_waiting_list_t receive_list;
1318  void* clock;
1319  os_mqueue_index_t* prev_array;
1320  os_mqueue_index_t* next_array;
1321  os_mqueue_prio_t* prio_array;
1322  void* first_free;
1323 #endif
1324 
1325  void* queue_addr;
1326  void* allocated_queue_addr;
1327  void* allocator;
1328 
1329 #if defined(OS_USE_RTOS_PORT_MESSAGE_QUEUE)
1330  os_mqueue_port_data_t port;
1331 #endif
1332 
1333  size_t queue_size_bytes;
1334  size_t allocated_queue_size_elements;
1335 
1336  os_mqueue_msg_size_t msg_size_bytes;
1337  os_mqueue_size_t msgs;
1338 
1339  os_mqueue_size_t count;
1340 #if !defined(OS_USE_RTOS_PORT_MESSAGE_QUEUE)
1341  os_mqueue_index_t head;
1342 #endif
1343 
1348  } os_mqueue_t;
1349 
1350 #pragma GCC diagnostic pop
1351 
1356  // ==========================================================================
1362 #pragma GCC diagnostic push
1363 #pragma GCC diagnostic ignored "-Wpadded"
1364 
1375  typedef struct os_evflags_attr_s
1376  {
1380  void* clock;
1381 
1383 
1400  typedef struct os_evflags_s
1401  {
1406  const char* name;
1407 #if !defined(OS_USE_RTOS_PORT_EVENT_FLAGS)
1408  os_internal_threads_waiting_list_t list;
1409  void* clock;
1410 #endif
1411 
1412 #if defined(OS_USE_RTOS_PORT_EVENT_FLAGS)
1413  os_evflags_port_data_t port_;
1414 #endif
1415 
1416  os_internal_evflags_t flags;
1417 
1422  } os_evflags_t;
1423 
1424 #pragma GCC diagnostic pop
1425 
1430  // ==========================================================================
1444  void
1445  os_systick_handler (void);
1446 
1450  void
1451  os_rtc_handler (void);
1452 
1461  // ==========================================================================
1481  typedef struct os_memory_s
1482  {
1483  char dummy; // Content is not relevant.
1484  } os_memory_t;
1485 
1490 // ============================================================================
1491 #ifdef __cplusplus
1492 }
1493 #endif
1494 
1495 #endif /* CMSIS_PLUS_RTOS_OS_C_STRUCTS_H_ */
os_clock_timestamp_t timestamp
Definition: os-c-decls.h:664
struct os_thread_context_s os_thread_context_t
Thread context.
struct os_internal_thread_children_list_s os_internal_thread_children_list_t
os_thread_prio_t mx_priority_ceiling
Mutex priority ceiling.
Definition: os-c-decls.h:909
Check mutex behaviour.
Definition: os-c-decls.h:873
uint8_t os_mutex_protocol_t
Definition: os-c-decls.h:799
void * mp_pool_address
Pointer to user provided memory pool area.
Definition: os-c-decls.h:1175
Default mutex protocol.
Definition: os-c-decls.h:832
class thread::stack * stack(void)
Get the interrupts stack.
Definition: os-core.cpp:562
uint8_t os_timer_type_t
Type of variables holding timer types.
Definition: os-c-decls.h:712
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:904
No longer usable, but resources not yet released.
Definition: os-c-decls.h:316
Thread context.
Definition: os-c-decls.h:427
struct os_evflags_attr_s os_evflags_attr_t
Event flags attributes.
size_t mq_queue_size_bytes
Size of user provided message queue area, in bytes.
Definition: os-c-decls.h:1287
os_timer_type_t tm_type
Timer type.
Definition: os-c-decls.h:744
Message queue object storage.
Definition: os-c-decls.h:1307
struct os_thread_s os_thread_t
Thread object storage.
void * os_thread_func_args_t
Type of thread function arguments.
Definition: os-c-decls.h:331
os_mutex_robustness_t mx_robustness
Mutex robustness.
Definition: os-c-decls.h:919
Thread attributes.
Definition: os-c-decls.h:489
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:1010
struct os_thread_attr_s os_thread_attr_t
Thread attributes.
uint16_t os_mqueue_msg_size_t
Definition: os-c-decls.h:1244
Event flags attributes.
Definition: os-c-decls.h:1375
Mutex attributes.
Definition: os-c-decls.h:899
os_semaphore_count_t sm_max_value
Semaphore max count value.
Definition: os-c-decls.h:1089
uint8_t os_mutex_type_t
Definition: os-c-decls.h:798
void * clock
Address of the clock to use for timeouts.
Definition: os-c-decls.h:500
uint8_t os_mqueue_size_t
Definition: os-c-decls.h:1241
void os_rtc_handler(void)
RTC interrupt handler.
Definition: os-clocks.cpp:99
struct os_timer_attr_s os_timer_attr_t
Timer attributes.
Used to catch uninitialised threads.
Definition: os-c-decls.h:300
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:1170
size_t th_stack_size_bytes
Size of the user defined storage for the thread stack, in bytes.
Definition: os-c-decls.h:522
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:739
os_semaphore_count_t sm_initial_value
Semaphore initial count value.
Definition: os-c-decls.h:1094
void * os_iterator_t
Generic iterator, implemented as a pointer.
Definition: os-c-decls.h:228
Timer object storage.
Definition: os-c-decls.h:764
struct os_internal_evflags_s os_internal_evflags_t
Internal event flags.
os_port_irq_state_t os_irq_state_t
Type of variables holding interrupts priority values.
Definition: os-c-decls.h:176
Semaphore attributes.
Definition: os-c-decls.h:1079
uint8_t os_thread_state_t
Type of variables holding thread states.
Definition: os-c-decls.h:350
struct os_timer_s os_timer_t
Timer object storage.
void * mq_queue_addr
Pointer to user provided message queue area.
Definition: os-c-decls.h:1282
Internal event flags.
Definition: os-c-decls.h:255
uint32_t os_result_t
Type of values returned by RTOS functions.
Definition: os-c-decls.h:100
struct os_thread_stack_s os_thread_stack_t
Thread stack.
uint32_t os_flags_mask_t
Type of variables holding flags masks.
Definition: os-c-decls.h:126
Default mutex type.
Definition: os-c-decls.h:883
struct os_thread_statistics_s os_thread_statistics_t
Thread statistics.
os_internal_double_list_links_t os_internal_threads_waiting_list_t
Definition: os-c-decls.h:66
Condition variable attributes.
Definition: os-c-decls.h:1005
Thread object storage.
Definition: os-c-decls.h:554
os_internal_double_list_links_t links
Definition: os-c-decls.h:70
int16_t os_semaphore_count_t
Type of variables holding semaphore counts.
Definition: os-c-decls.h:1064
Present in the READY list and competing for CPU.
Definition: os-c-decls.h:304
struct os_mempool_s os_mempool_t
Memory pool object storage.
struct os_internal_double_list_links_s os_internal_double_list_links_t
uint64_t os_statistics_duration_t
Type of variables holding durations in CPU cycles.
Definition: os-c-decls.h:244
struct os_mempool_attr_s os_mempool_attr_t
Memory pool attributes.
void * th_stack_address
Address of the user defined storage for the thread stack.
Definition: os-c-decls.h:508
Thread statistics.
Definition: os-c-decls.h:457
os_thread_prio_t th_priority
Thread initial priority.
Definition: os-c-decls.h:534
os_port_clock_duration_t os_clock_duration_t
Type of variables holding clock durations.
Definition: os-c-decls.h:202
struct os_mutex_attr_s os_mutex_attr_t
Mutex attributes.
Event flags object storage.
Definition: os-c-decls.h:1400
int16_t os_mutex_count_t
Definition: os-c-decls.h:797
struct os_condvar_attr_s os_condvar_attr_t
Condition variable attributes.
Normal robustness.
Definition: os-c-decls.h:845
Enhanced robustness at thread termination.
Definition: os-c-decls.h:850
rtos::statistics::counter_t context_switches(void)
Get the total number of context switches.
Definition: os-sched.h:1044
struct os_clock_s os_clock_t
Clock object storage.
Inherit priority from highest priority thread.
Definition: os-c-decls.h:822
size_t mp_pool_size_bytes
Size of user provided memory pool area, in bytes.
Definition: os-c-decls.h:1180
struct os_semaphore_s os_semaphore_t
Semaphore object storage.
Thread stack.
Definition: os-c-decls.h:402
Memory pool attributes.
Definition: os-c-decls.h:1165
struct os_condvar_s os_condvar_t
Condition variable object storage.
Not present in the READY list, waiting for an event.
Definition: os-c-decls.h:312
struct os_semaphore_attr_s os_semaphore_attr_t
Semaphore attributes.
Execute at the highest priority.
Definition: os-c-decls.h:827
Normal mutex behaviour.
Definition: os-c-decls.h:868
os_port_thread_stack_allocation_element_t os_thread_stack_allocation_element_t
Type of variables holding aligned stack elements.
Definition: os-c-decls.h:387
Timer attributes.
Definition: os-c-decls.h:734
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:1084
struct os_mqueue_attr_s os_mqueue_attr_t
Message queue attributes.
Semaphore object storage.
Definition: os-c-decls.h:1114
os_mutex_count_t mx_max_count
Recursive mutex max count.
Definition: os-c-decls.h:929
os_mutex_type_t mx_type
Mutex type.
Definition: os-c-decls.h:924
Has the CPU and runs.
Definition: os-c-decls.h:308
os_mqueue_size_t os_mqueue_index_t
Definition: os-c-decls.h:1245
struct os_mqueue_s os_mqueue_t
Message queue object storage.
uint8_t os_timer_state_t
Type of variables holding timer states.
Definition: os-c-decls.h:719
struct os_evflags_s os_evflags_t
Event flags object storage.
Priority and scheduling not affected by mutex ownership.
Definition: os-c-decls.h:817
uint8_t os_mutex_robustness_t
Definition: os-c-decls.h:800
struct os_clock_node_s os_internal_clock_timer_node_t
clock_t clock(void)
uint16_t os_mempool_size_t
Definition: os-c-decls.h:1145
uint64_t os_statistics_counter_t
Type of variables holding context switches counters.
Definition: os-c-decls.h:237
Memory pool object storage.
Definition: os-c-decls.h:1200
os_port_thread_stack_element_t os_thread_stack_element_t
Type of variables holding stack words.
Definition: os-c-decls.h:377
os_port_clock_offset_t os_clock_offset_t
Type of variables holding clock offsets.
Definition: os-c-decls.h:214
os_mutex_protocol_t mx_protocol
Mutex protocol.
Definition: os-c-decls.h:914
os_flags_mask_t flags_mask
Definition: os-c-decls.h:257
void(* os_timer_func_t)(os_timer_func_args_t args)
Type of timer function.
Definition: os-c-decls.h:705
uint8_t os_thread_prio_t
Type of variables holding thread priorities.
Definition: os-c-decls.h:364
uint32_t os_flags_mode_t
Type of variables holding flags modes.
Definition: os-c-decls.h:113
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:1380
void * clock
Pointer to clock object instance.
Definition: os-c-decls.h:1277
uint8_t os_mqueue_prio_t
Type of variables holding message queue priorities.
Definition: os-c-decls.h:1257
Condition variable object storage.
Definition: os-c-decls.h:1031
struct os_mutex_s os_mutex_t
Mutex object storage.
void os_systick_handler(void)
SysTick interrupt handler.
Definition: os-clocks.cpp:42
os_port_clock_timestamp_t os_clock_timestamp_t
Type of variables holding clock time stamps.
Definition: os-c-decls.h:191
os_internal_double_list_links_t links
Definition: os-c-decls.h:75
allocator_stateless_default_resource< T > allocator
Type of allocator used by the system objects. Must be stateless.
Definition: os-types.h:57
#define OS_THREAD_PRIO_SHIFT
Definition: os-c-decls.h:261
Recursive mutex behaviour.
Definition: os-c-decls.h:878
Default mutex robustness.
Definition: os-c-decls.h:855
os_internal_double_list_links_t links
Definition: os-c-decls.h:81
Mutex object storage.
Definition: os-c-decls.h:949
struct os_internal_clock_timestamps_list_s os_internal_clock_timestamps_list_t
void * os_timer_func_args_t
Type of timer function arguments.
Definition: os-c-decls.h:693
void *(* os_thread_func_t)(os_thread_func_args_t args)
Type of thread function.
Definition: os-c-decls.h:343
struct os_internal_waiting_thread_node_s os_internal_waiting_thread_node_t
os_port_scheduler_state_t os_sched_state_t
Type of variables holding scheduler state codes.
Definition: os-c-decls.h:162
Clock object storage.
Definition: os-c-decls.h:631
Memory resource object storage.
Definition: os-c-decls.h:1481
Terminated and resources (like stack) released.
Definition: os-c-decls.h:320
Message queue attributes.
Definition: os-c-decls.h:1272
struct os_memory_s os_memory_t
Memory resource object storage.
rtos::statistics::duration_t cpu_cycles(void)
Get the total duration of all threads.
Definition: os-sched.h:1069