Mistake on this page?
Report an issue in GitHub or email us
rtx_os.h
1 /*
2  * Copyright (c) 2013-2019 Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * -----------------------------------------------------------------------------
19  *
20  * Project: CMSIS-RTOS RTX
21  * Title: RTX OS definitions
22  *
23  * -----------------------------------------------------------------------------
24  */
25 
26 #ifndef RTX_OS_H_
27 #define RTX_OS_H_
28 
29 #include <stdint.h>
30 #include <stddef.h>
31 #include "cmsis_os2.h"
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
38 
39 /// Kernel Information
40 #define osRtxVersionAPI 20010003 ///< API version (2.1.3)
41 #define osRtxVersionKernel 50050000 ///< Kernel version (5.5.0)
42 #define osRtxKernelId "RTX V5.5.0" ///< Kernel identification string
43 
44 
45 // ==== Common definitions ====
46 
47 /// Object Identifier definitions
48 #define osRtxIdInvalid 0x00U
49 #define osRtxIdThread 0xF1U
50 #define osRtxIdTimer 0xF2U
51 #define osRtxIdEventFlags 0xF3U
52 #define osRtxIdMutex 0xF5U
53 #define osRtxIdSemaphore 0xF6U
54 #define osRtxIdMemoryPool 0xF7U
55 #define osRtxIdMessage 0xF9U
56 #define osRtxIdMessageQueue 0xFAU
57 
58 /// Object Flags definitions
59 #define osRtxFlagSystemObject 0x01U
60 #define osRtxFlagSystemMemory 0x02U
61 
62 
63 // ==== Kernel definitions ====
64 
65 /// Kernel State definitions
66 #define osRtxKernelInactive ((uint8_t)osKernelInactive)
67 #define osRtxKernelReady ((uint8_t)osKernelReady)
68 #define osRtxKernelRunning ((uint8_t)osKernelRunning)
69 #define osRtxKernelLocked ((uint8_t)osKernelLocked)
70 #define osRtxKernelSuspended ((uint8_t)osKernelSuspended)
71 
72 
73 // ==== Thread definitions ====
74 
75 /// Thread State definitions (extending osThreadState)
76 #define osRtxThreadStateMask 0x0FU
77 
78 #define osRtxThreadInactive ((uint8_t)osThreadInactive)
79 #define osRtxThreadReady ((uint8_t)osThreadReady)
80 #define osRtxThreadRunning ((uint8_t)osThreadRunning)
81 #define osRtxThreadBlocked ((uint8_t)osThreadBlocked)
82 #define osRtxThreadTerminated ((uint8_t)osThreadTerminated)
83 
84 #define osRtxThreadWaitingDelay ((uint8_t)(osRtxThreadBlocked | 0x10U))
85 #define osRtxThreadWaitingJoin ((uint8_t)(osRtxThreadBlocked | 0x20U))
86 #define osRtxThreadWaitingThreadFlags ((uint8_t)(osRtxThreadBlocked | 0x30U))
87 #define osRtxThreadWaitingEventFlags ((uint8_t)(osRtxThreadBlocked | 0x40U))
88 #define osRtxThreadWaitingMutex ((uint8_t)(osRtxThreadBlocked | 0x50U))
89 #define osRtxThreadWaitingSemaphore ((uint8_t)(osRtxThreadBlocked | 0x60U))
90 #define osRtxThreadWaitingMemoryPool ((uint8_t)(osRtxThreadBlocked | 0x70U))
91 #define osRtxThreadWaitingMessageGet ((uint8_t)(osRtxThreadBlocked | 0x80U))
92 #define osRtxThreadWaitingMessagePut ((uint8_t)(osRtxThreadBlocked | 0x90U))
93 
94 /// Thread Flags definitions
95 #define osRtxThreadFlagDefStack 0x10U ///< Default Stack flag
96 
97 /// Stack Marker definitions
98 #define osRtxStackMagicWord 0xE25A2EA5U ///< Stack Magic Word (Stack Base)
99 #define osRtxStackFillPattern 0xCCCCCCCCU ///< Stack Fill Pattern
100 
101 /// Thread Control Block
102 typedef struct osRtxThread_s {
103  uint8_t id; ///< Object Identifier
104  uint8_t state; ///< Object State
105  uint8_t flags; ///< Object Flags
106  uint8_t attr; ///< Object Attributes
107  const char *name; ///< Object Name
108  struct osRtxThread_s *thread_next; ///< Link pointer to next Thread in Object list
109  struct osRtxThread_s *thread_prev; ///< Link pointer to previous Thread in Object list
110  struct osRtxThread_s *delay_next; ///< Link pointer to next Thread in Delay list
111  struct osRtxThread_s *delay_prev; ///< Link pointer to previous Thread in Delay list
112  struct osRtxThread_s *thread_join; ///< Thread waiting to Join
113  uint32_t delay; ///< Delay Time
114  int8_t priority; ///< Thread Priority
115  int8_t priority_base; ///< Base Priority
116  uint8_t stack_frame; ///< Stack Frame (EXC_RETURN[7..0])
117  uint8_t flags_options; ///< Thread/Event Flags Options
118  uint32_t wait_flags; ///< Waiting Thread/Event Flags
119  uint32_t thread_flags; ///< Thread Flags
120  struct osRtxMutex_s *mutex_list; ///< Link pointer to list of owned Mutexes
121  void *stack_mem; ///< Stack Memory
122  uint32_t stack_size; ///< Stack Size
123  uint32_t sp; ///< Current Stack Pointer
124  uint32_t thread_addr; ///< Thread entry address
125  uint32_t tz_memory; ///< TrustZone Memory Identifier
126 #ifdef RTX_TF_M_EXTENSION
127  uint32_t tz_module; ///< TrustZone Module Identifier
128 #endif
129 } osRtxThread_t;
130 
131 
132 // ==== Timer definitions ====
133 
134 /// Timer State definitions
135 #define osRtxTimerInactive 0x00U ///< Timer Inactive
136 #define osRtxTimerStopped 0x01U ///< Timer Stopped
137 #define osRtxTimerRunning 0x02U ///< Timer Running
138 
139 /// Timer Type definitions
140 #define osRtxTimerPeriodic ((uint8_t)osTimerPeriodic)
141 
142 /// Timer Function Information
143 typedef struct {
144  osTimerFunc_t func; ///< Function Pointer
145  void *arg; ///< Function Argument
147 
148 /// Timer Control Block
149 typedef struct osRtxTimer_s {
150  uint8_t id; ///< Object Identifier
151  uint8_t state; ///< Object State
152  uint8_t flags; ///< Object Flags
153  uint8_t type; ///< Timer Type (Periodic/One-shot)
154  const char *name; ///< Object Name
155  struct osRtxTimer_s *prev; ///< Pointer to previous active Timer
156  struct osRtxTimer_s *next; ///< Pointer to next active Timer
157  uint32_t tick; ///< Timer current Tick
158  uint32_t load; ///< Timer Load value
159  osRtxTimerFinfo_t finfo; ///< Timer Function Info
160 } osRtxTimer_t;
161 
162 
163 // ==== Event Flags definitions ====
164 
165 /// Event Flags Control Block
166 typedef struct {
167  uint8_t id; ///< Object Identifier
168  uint8_t reserved_state; ///< Object State (not used)
169  uint8_t flags; ///< Object Flags
170  uint8_t reserved;
171  const char *name; ///< Object Name
172  osRtxThread_t *thread_list; ///< Waiting Threads List
173  uint32_t event_flags; ///< Event Flags
175 
176 
177 // ==== Mutex definitions ====
178 
179 /// Mutex Control Block
180 typedef struct osRtxMutex_s {
181  uint8_t id; ///< Object Identifier
182  uint8_t reserved_state; ///< Object State (not used)
183  uint8_t flags; ///< Object Flags
184  uint8_t attr; ///< Object Attributes
185  const char *name; ///< Object Name
186  osRtxThread_t *thread_list; ///< Waiting Threads List
187  osRtxThread_t *owner_thread; ///< Owner Thread
188  struct osRtxMutex_s *owner_prev; ///< Pointer to previous owned Mutex
189  struct osRtxMutex_s *owner_next; ///< Pointer to next owned Mutex
190  uint8_t lock; ///< Lock counter
191  uint8_t padding[3];
192 } osRtxMutex_t;
193 
194 
195 // ==== Semaphore definitions ====
196 
197 /// Semaphore Control Block
198 typedef struct {
199  uint8_t id; ///< Object Identifier
200  uint8_t reserved_state; ///< Object State (not used)
201  uint8_t flags; ///< Object Flags
202  uint8_t reserved;
203  const char *name; ///< Object Name
204  osRtxThread_t *thread_list; ///< Waiting Threads List
205  uint16_t tokens; ///< Current number of tokens
206  uint16_t max_tokens; ///< Maximum number of tokens
208 
209 
210 // ==== Memory Pool definitions ====
211 
212 /// Memory Pool Information
213 typedef struct {
214  uint32_t max_blocks; ///< Maximum number of Blocks
215  uint32_t used_blocks; ///< Number of used Blocks
216  uint32_t block_size; ///< Block Size
217  void *block_base; ///< Block Memory Base Address
218  void *block_lim; ///< Block Memory Limit Address
219  void *block_free; ///< First free Block Address
220 } osRtxMpInfo_t;
221 
222 /// Memory Pool Control Block
223 typedef struct {
224  uint8_t id; ///< Object Identifier
225  uint8_t reserved_state; ///< Object State (not used)
226  uint8_t flags; ///< Object Flags
227  uint8_t reserved;
228  const char *name; ///< Object Name
229  osRtxThread_t *thread_list; ///< Waiting Threads List
230  osRtxMpInfo_t mp_info; ///< Memory Pool Info
232 
233 
234 // ==== Message Queue definitions ====
235 
236 /// Message Control Block
237 typedef struct osRtxMessage_s {
238  uint8_t id; ///< Object Identifier
239  uint8_t reserved_state; ///< Object State (not used)
240  uint8_t flags; ///< Object Flags
241  uint8_t priority; ///< Message Priority
242  struct osRtxMessage_s *prev; ///< Pointer to previous Message
243  struct osRtxMessage_s *next; ///< Pointer to next Message
245 
246 /// Message Queue Control Block
247 typedef struct {
248  uint8_t id; ///< Object Identifier
249  uint8_t reserved_state; ///< Object State (not used)
250  uint8_t flags; ///< Object Flags
251  uint8_t reserved;
252  const char *name; ///< Object Name
253  osRtxThread_t *thread_list; ///< Waiting Threads List
254  osRtxMpInfo_t mp_info; ///< Memory Pool Info
255  uint32_t msg_size; ///< Message Size
256  uint32_t msg_count; ///< Number of queued Messages
257  osRtxMessage_t *msg_first; ///< Pointer to first Message
258  osRtxMessage_t *msg_last; ///< Pointer to last Message
260 
261 
262 // ==== Generic Object definitions ====
263 
264 /// Generic Object Control Block
265 typedef struct {
266  uint8_t id; ///< Object Identifier
267  uint8_t state; ///< Object State
268  uint8_t flags; ///< Object Flags
269  uint8_t reserved;
270  const char *name; ///< Object Name
271  osRtxThread_t *thread_list; ///< Threads List
272 } osRtxObject_t;
273 
274 
275 // ==== OS Runtime Information definitions ====
276 
277 /// OS Runtime Information structure
278 typedef struct {
279  const char *os_id; ///< OS Identification
280  uint32_t version; ///< OS Version
281  struct { ///< Kernel Info
282  uint8_t state; ///< State
283  volatile uint8_t blocked; ///< Blocked
284  uint8_t pendSV; ///< Pending SV
285  uint8_t reserved;
286  uint32_t tick; ///< Tick counter
287  } kernel;
288  int32_t tick_irqn; ///< Tick Timer IRQ Number
289  struct { ///< Thread Info
290  struct { ///< Thread Run Info
291  osRtxThread_t *curr; ///< Current running Thread
292  osRtxThread_t *next; ///< Next Thread to Run
293  } run;
294  osRtxObject_t ready; ///< Ready List Object
295  osRtxThread_t *idle; ///< Idle Thread
296  osRtxThread_t *delay_list; ///< Delay List
297  osRtxThread_t *wait_list; ///< Wait List (no Timeout)
298  osRtxThread_t *terminate_list; ///< Terminate Thread List
299  struct { ///< Thread Round Robin Info
300  osRtxThread_t *thread; ///< Round Robin Thread
301  uint32_t tick; ///< Round Robin Time Tick
302  uint32_t timeout; ///< Round Robin Timeout
303  } robin;
304  } thread;
305  struct { ///< Timer Info
306  osRtxTimer_t *list; ///< Active Timer List
307  osRtxThread_t *thread; ///< Timer Thread
308  osRtxMessageQueue_t *mq; ///< Timer Message Queue
309  void (*tick)(void); ///< Timer Tick Function
310  } timer;
311  struct { ///< ISR Post Processing Queue
312  uint16_t max; ///< Maximum Items
313  uint16_t cnt; ///< Item Count
314  uint16_t in; ///< Incoming Item Index
315  uint16_t out; ///< Outgoing Item Index
316  void **data; ///< Queue Data
317  } isr_queue;
318  struct { ///< ISR Post Processing functions
319  void (*thread)(osRtxThread_t*); ///< Thread Post Processing function
320  void (*event_flags)(osRtxEventFlags_t*); ///< Event Flags Post Processing function
321  void (*semaphore)(osRtxSemaphore_t*); ///< Semaphore Post Processing function
322  void (*memory_pool)(osRtxMemoryPool_t*); ///< Memory Pool Post Processing function
323  void (*message)(osRtxMessage_t*); ///< Message Post Processing function
324  } post_process;
325  struct { ///< Memory Pools (Variable Block Size)
326  void *stack; ///< Stack Memory
327  void *mp_data; ///< Memory Pool Data Memory
328  void *mq_data; ///< Message Queue Data Memory
329  void *common; ///< Common Memory
330  } mem;
331  struct { ///< Memory Pools (Fixed Block Size)
332  osRtxMpInfo_t *stack; ///< Stack for Threads
333  osRtxMpInfo_t *thread; ///< Thread Control Blocks
334  osRtxMpInfo_t *timer; ///< Timer Control Blocks
335  osRtxMpInfo_t *event_flags; ///< Event Flags Control Blocks
336  osRtxMpInfo_t *mutex; ///< Mutex Control Blocks
337  osRtxMpInfo_t *semaphore; ///< Semaphore Control Blocks
338  osRtxMpInfo_t *memory_pool; ///< Memory Pool Control Blocks
339  osRtxMpInfo_t *message_queue; ///< Message Queue Control Blocks
340  } mpi;
341 } osRtxInfo_t;
342 
343 extern osRtxInfo_t osRtxInfo; ///< OS Runtime Information
344 
345 /// OS Runtime Object Memory Usage structure
346 typedef struct {
347  uint32_t cnt_alloc; ///< Counter for alloc
348  uint32_t cnt_free; ///< Counter for free
349  uint32_t max_used; ///< Maximum used
351 
352 /// OS Runtime Object Memory Usage variables
353 extern osRtxObjectMemUsage_t osRtxThreadMemUsage;
354 extern osRtxObjectMemUsage_t osRtxTimerMemUsage;
355 extern osRtxObjectMemUsage_t osRtxEventFlagsMemUsage;
356 extern osRtxObjectMemUsage_t osRtxMutexMemUsage;
357 extern osRtxObjectMemUsage_t osRtxSemaphoreMemUsage;
358 extern osRtxObjectMemUsage_t osRtxMemoryPoolMemUsage;
359 extern osRtxObjectMemUsage_t osRtxMessageQueueMemUsage;
360 
361 
362 // ==== OS API definitions ====
363 
364 // Object Limits definitions
365 #define osRtxThreadFlagsLimit 31U ///< number of Thread Flags available per thread
366 #define osRtxEventFlagsLimit 31U ///< number of Event Flags available per object
367 #define osRtxMutexLockLimit 255U ///< maximum number of recursive mutex locks
368 #define osRtxSemaphoreTokenLimit 65535U ///< maximum number of tokens per semaphore
369 
370 // Control Block sizes
371 #define osRtxThreadCbSize sizeof(osRtxThread_t)
372 #define osRtxTimerCbSize sizeof(osRtxTimer_t)
373 #define osRtxEventFlagsCbSize sizeof(osRtxEventFlags_t)
374 #define osRtxMutexCbSize sizeof(osRtxMutex_t)
375 #define osRtxSemaphoreCbSize sizeof(osRtxSemaphore_t)
376 #define osRtxMemoryPoolCbSize sizeof(osRtxMemoryPool_t)
377 #define osRtxMessageQueueCbSize sizeof(osRtxMessageQueue_t)
378 
379 /// Memory size in bytes for Memory Pool storage.
380 /// \param block_count maximum number of memory blocks in memory pool.
381 /// \param block_size memory block size in bytes.
382 #define osRtxMemoryPoolMemSize(block_count, block_size) \
383  (4*(block_count)*(((block_size)+3)/4))
384 
385 /// Memory size in bytes for Message Queue storage.
386 /// \param msg_count maximum number of messages in queue.
387 /// \param msg_size maximum message size in bytes.
388 #define osRtxMessageQueueMemSize(msg_count, msg_size) \
389  (4*(msg_count)*(3+(((msg_size)+3)/4)))
390 
391 
392 // ==== OS External Functions ====
393 
394 // OS Error Codes
395 #define osRtxErrorStackUnderflow 1U ///< Stack overflow, i.e. stack pointer below its lower memory limit for descending stacks.
396 #define osRtxErrorISRQueueOverflow 2U ///< ISR Queue overflow detected when inserting object.
397 #define osRtxErrorTimerQueueOverflow 3U ///< User Timer Callback Queue overflow detected for timer.
398 #define osRtxErrorClibSpace 4U ///< Standard C/C++ library libspace not available: increase \c OS_THREAD_LIBSPACE_NUM.
399 #define osRtxErrorClibMutex 5U ///< Standard C/C++ library mutex initialization failed.
400 
401 /// OS Error Callback function
402 extern uint32_t osRtxErrorNotify (uint32_t code, void *object_id);
403 
404 /// OS Idle Thread
405 extern void osRtxIdleThread (void *argument);
406 
407 /// OS Exception handlers
408 extern void SVC_Handler (void);
409 extern void PendSV_Handler (void);
410 extern void SysTick_Handler (void);
411 
412 /// OS Trusted Firmware M Extension
413 #ifdef RTX_TF_M_EXTENSION
414 extern uint32_t osRtxTzGetModuleId (void);
415 #endif
416 
417 
418 // ==== OS External Configuration ====
419 
420 /// OS Configuration flags
421 #define osRtxConfigPrivilegedMode (1UL<<0) ///< Threads in Privileged mode
422 #define osRtxConfigStackCheck (1UL<<1) ///< Stack overrun checking
423 #define osRtxConfigStackWatermark (1UL<<2) ///< Stack usage Watermark
424 
425 /// OS Configuration structure
426 typedef struct {
427  uint32_t flags; ///< OS Configuration Flags
428  uint32_t tick_freq; ///< Kernel Tick Frequency
429  uint32_t robin_timeout; ///< Round Robin Timeout Tick
430  struct { ///< ISR Post Processing Queue
431  void **data; ///< Queue Data
432  uint16_t max; ///< Maximum Items
433  uint16_t padding;
434  } isr_queue;
435  struct { ///< Memory Pools (Variable Block Size)
436  void *stack_addr; ///< Stack Memory Address
437  uint32_t stack_size; ///< Stack Memory Size
438  void *mp_data_addr; ///< Memory Pool Memory Address
439  uint32_t mp_data_size; ///< Memory Pool Memory Size
440  void *mq_data_addr; ///< Message Queue Data Memory Address
441  uint32_t mq_data_size; ///< Message Queue Data Memory Size
442  void *common_addr; ///< Common Memory Address
443  uint32_t common_size; ///< Common Memory Size
444  } mem;
445  struct { ///< Memory Pools (Fixed Block Size)
446  osRtxMpInfo_t *stack; ///< Stack for Threads
447  osRtxMpInfo_t *thread; ///< Thread Control Blocks
448  osRtxMpInfo_t *timer; ///< Timer Control Blocks
449  osRtxMpInfo_t *event_flags; ///< Event Flags Control Blocks
450  osRtxMpInfo_t *mutex; ///< Mutex Control Blocks
451  osRtxMpInfo_t *semaphore; ///< Semaphore Control Blocks
452  osRtxMpInfo_t *memory_pool; ///< Memory Pool Control Blocks
453  osRtxMpInfo_t *message_queue; ///< Message Queue Control Blocks
454  } mpi;
455  uint32_t thread_stack_size; ///< Default Thread Stack Size
456  const
457  osThreadAttr_t *idle_thread_attr; ///< Idle Thread Attributes
458  const
459  osThreadAttr_t *timer_thread_attr; ///< Timer Thread Attributes
460  const
461  osMessageQueueAttr_t *timer_mq_attr; ///< Timer Message Queue Attributes
462  uint32_t timer_mq_mcnt; ///< Timer Message Queue maximum Messages
463 } osRtxConfig_t;
464 
465 extern const osRtxConfig_t osRtxConfig; ///< OS Configuration
466 
467 
468 #ifdef __cplusplus
469 }
470 #endif
471 
472 #endif // RTX_OS_H_
OS Runtime Object Memory Usage structure.
Definition: rtx_os.h:346
osRtxTimer_t * list
< Timer Info
Definition: rtx_os.h:306
uint32_t wait_flags
Waiting Thread/Event Flags.
Definition: rtx_os.h:118
osRtxMpInfo_t * stack
< Memory Pools (Fixed Block Size)
Definition: rtx_os.h:446
uint8_t flags
Object Flags.
Definition: rtx_os.h:201
Message Queue Control Block.
Definition: rtx_os.h:247
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:182
OS Configuration structure.
Definition: rtx_os.h:426
uint8_t flags
Object Flags.
Definition: rtx_os.h:268
int8_t priority
Thread Priority.
Definition: rtx_os.h:114
osRtxMpInfo_t * thread
Thread Control Blocks.
Definition: rtx_os.h:333
Attributes structure for thread.
Definition: cmsis_os2.h:240
osRtxThread_t * idle
Idle Thread.
Definition: rtx_os.h:295
void * common
Common Memory.
Definition: rtx_os.h:329
Memory Pool Control Block.
Definition: rtx_os.h:223
const char * name
Object Name.
Definition: rtx_os.h:107
const osMessageQueueAttr_t * timer_mq_attr
Timer Message Queue Attributes.
Definition: rtx_os.h:461
uint8_t id
Object Identifier.
Definition: rtx_os.h:238
void ** data
< ISR Post Processing Queue
Definition: rtx_os.h:431
uint8_t stack_frame
Stack Frame (EXC_RETURN[7..0])
Definition: rtx_os.h:116
osRtxMpInfo_t * event_flags
Event Flags Control Blocks.
Definition: rtx_os.h:335
uint32_t version
OS Version.
Definition: rtx_os.h:280
uint32_t max_used
Maximum used.
Definition: rtx_os.h:349
Semaphore Control Block.
Definition: rtx_os.h:198
const osThreadAttr_t * timer_thread_attr
Timer Thread Attributes.
Definition: rtx_os.h:459
uint8_t priority
Message Priority.
Definition: rtx_os.h:241
void ** data
Queue Data.
Definition: rtx_os.h:316
const char * name
Object Name.
Definition: rtx_os.h:154
void * mq_data
Message Queue Data Memory.
Definition: rtx_os.h:328
osRtxMessage_t * msg_last
Pointer to last Message.
Definition: rtx_os.h:258
Generic Object Control Block.
Definition: rtx_os.h:265
uint32_t timeout
Round Robin Timeout.
Definition: rtx_os.h:302
uint32_t tick_freq
Kernel Tick Frequency.
Definition: rtx_os.h:428
osTimerFunc_t func
Function Pointer.
Definition: rtx_os.h:144
Message Control Block.
Definition: rtx_os.h:237
Thread Control Block.
Definition: rtx_os.h:102
void * stack_addr
< Memory Pools (Variable Block Size)
Definition: rtx_os.h:436
uint8_t flags_options
Thread/Event Flags Options.
Definition: rtx_os.h:117
struct osRtxThread_s * delay_next
Link pointer to next Thread in Delay list.
Definition: rtx_os.h:110
struct osRtxTimer_s * prev
Pointer to previous active Timer.
Definition: rtx_os.h:155
uint8_t flags
Object Flags.
Definition: rtx_os.h:183
uint32_t tick
Timer current Tick.
Definition: rtx_os.h:157
uint16_t max_tokens
Maximum number of tokens.
Definition: rtx_os.h:206
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:225
uint16_t tokens
Current number of tokens.
Definition: rtx_os.h:205
uint32_t cnt_alloc
Counter for alloc.
Definition: rtx_os.h:347
osRtxThread_t * thread_list
Waiting Threads List.
Definition: rtx_os.h:204
osRtxMessage_t * msg_first
Pointer to first Message.
Definition: rtx_os.h:257
struct osRtxMutex_s * mutex_list
Link pointer to list of owned Mutexes.
Definition: rtx_os.h:120
uint32_t flags
OS Configuration Flags.
Definition: rtx_os.h:427
uint8_t id
Object Identifier.
Definition: rtx_os.h:181
uint8_t state
Object State.
Definition: rtx_os.h:267
osRtxThread_t * thread_list
Threads List.
Definition: rtx_os.h:271
uint32_t timer_mq_mcnt
Timer Message Queue maximum Messages.
Definition: rtx_os.h:462
void * block_base
Block Memory Base Address.
Definition: rtx_os.h:217
uint32_t thread_flags
Thread Flags.
Definition: rtx_os.h:119
osRtxMpInfo_t * timer
Timer Control Blocks.
Definition: rtx_os.h:334
Timer Function Information.
Definition: rtx_os.h:143
uint32_t mq_data_size
Message Queue Data Memory Size.
Definition: rtx_os.h:441
struct osRtxThread_s * delay_prev
Link pointer to previous Thread in Delay list.
Definition: rtx_os.h:111
void * block_free
First free Block Address.
Definition: rtx_os.h:219
Attributes structure for message queue.
Definition: cmsis_os2.h:295
uint8_t id
Object Identifier.
Definition: rtx_os.h:248
uint32_t stack_size
Stack Size.
Definition: rtx_os.h:122
osRtxMpInfo_t * thread
Thread Control Blocks.
Definition: rtx_os.h:447
void * mq_data_addr
Message Queue Data Memory Address.
Definition: rtx_os.h:440
uint32_t stack_size
Stack Memory Size.
Definition: rtx_os.h:437
struct osRtxThread_s * thread_prev
Link pointer to previous Thread in Object list.
Definition: rtx_os.h:109
Memory Pool Information.
Definition: rtx_os.h:213
osRtxMpInfo_t * timer
Timer Control Blocks.
Definition: rtx_os.h:448
osRtxThread_t * thread_list
Waiting Threads List.
Definition: rtx_os.h:229
osRtxThread_t * thread
< Thread Round Robin Info
Definition: rtx_os.h:300
const osThreadAttr_t * idle_thread_attr
Idle Thread Attributes.
Definition: rtx_os.h:457
uint16_t max
Maximum Items.
Definition: rtx_os.h:432
uint32_t cnt_free
Counter for free.
Definition: rtx_os.h:348
osRtxMpInfo_t * mutex
Mutex Control Blocks.
Definition: rtx_os.h:336
osRtxThread_t * thread_list
Waiting Threads List.
Definition: rtx_os.h:253
const char * name
Object Name.
Definition: rtx_os.h:270
uint16_t max
< ISR Post Processing Queue
Definition: rtx_os.h:312
uint16_t in
Incoming Item Index.
Definition: rtx_os.h:314
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:249
osRtxThread_t * curr
< Thread Run Info
Definition: rtx_os.h:291
uint8_t id
Object Identifier.
Definition: rtx_os.h:224
osRtxMpInfo_t mp_info
Memory Pool Info.
Definition: rtx_os.h:254
struct osRtxMessage_s * next
Pointer to next Message.
Definition: rtx_os.h:243
osRtxMpInfo_t * stack
< Memory Pools (Fixed Block Size)
Definition: rtx_os.h:332
uint8_t flags
Object Flags.
Definition: rtx_os.h:169
uint32_t load
Timer Load value.
Definition: rtx_os.h:158
Event Flags Control Block.
Definition: rtx_os.h:166
uint8_t pendSV
Pending SV.
Definition: rtx_os.h:284
uint8_t id
Object Identifier.
Definition: rtx_os.h:199
void * stack
< Memory Pools (Variable Block Size)
Definition: rtx_os.h:326
osRtxMpInfo_t * semaphore
Semaphore Control Blocks.
Definition: rtx_os.h:337
void * block_lim
Block Memory Limit Address.
Definition: rtx_os.h:218
void * arg
Function Argument.
Definition: rtx_os.h:145
uint8_t flags
Object Flags.
Definition: rtx_os.h:226
void * mp_data_addr
Memory Pool Memory Address.
Definition: rtx_os.h:438
uint8_t state
< Kernel Info
Definition: rtx_os.h:282
const char * name
Object Name.
Definition: rtx_os.h:203
osRtxMpInfo_t * mutex
Mutex Control Blocks.
Definition: rtx_os.h:450
struct osRtxMutex_s * owner_prev
Pointer to previous owned Mutex.
Definition: rtx_os.h:188
uint8_t id
Object Identifier.
Definition: rtx_os.h:103
void * stack_mem
Stack Memory.
Definition: rtx_os.h:121
void * common_addr
Common Memory Address.
Definition: rtx_os.h:442
uint8_t flags
Object Flags.
Definition: rtx_os.h:250
osRtxMpInfo_t * message_queue
Message Queue Control Blocks.
Definition: rtx_os.h:339
Timer Control Block.
Definition: rtx_os.h:149
osRtxThread_t * terminate_list
Terminate Thread List.
Definition: rtx_os.h:298
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:200
struct osRtxThread_s * thread_next
Link pointer to next Thread in Object list.
Definition: rtx_os.h:108
uint32_t mp_data_size
Memory Pool Memory Size.
Definition: rtx_os.h:439
osRtxThread_t * wait_list
Wait List (no Timeout)
Definition: rtx_os.h:297
int8_t priority_base
Base Priority.
Definition: rtx_os.h:115
uint8_t attr
Object Attributes.
Definition: rtx_os.h:106
uint16_t out
Outgoing Item Index.
Definition: rtx_os.h:315
uint8_t id
Object Identifier.
Definition: rtx_os.h:167
osRtxThread_t * next
Next Thread to Run.
Definition: rtx_os.h:292
struct osRtxMutex_s * owner_next
Pointer to next owned Mutex.
Definition: rtx_os.h:189
const char * os_id
OS Identification.
Definition: rtx_os.h:279
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:168
Mutex Control Block.
Definition: rtx_os.h:180
uint32_t delay
Delay Time.
Definition: rtx_os.h:113
uint8_t type
Timer Type (Periodic/One-shot)
Definition: rtx_os.h:153
uint32_t common_size
Common Memory Size.
Definition: rtx_os.h:443
struct osRtxMessage_s * prev
Pointer to previous Message.
Definition: rtx_os.h:242
const char * name
Object Name.
Definition: rtx_os.h:171
osRtxMpInfo_t * event_flags
Event Flags Control Blocks.
Definition: rtx_os.h:449
osRtxThread_t * delay_list
Delay List.
Definition: rtx_os.h:296
osRtxMpInfo_t mp_info
Memory Pool Info.
Definition: rtx_os.h:230
uint32_t robin_timeout
Round Robin Timeout Tick.
Definition: rtx_os.h:429
uint32_t thread_addr
Thread entry address.
Definition: rtx_os.h:124
uint8_t id
Object Identifier.
Definition: rtx_os.h:150
osRtxMpInfo_t * message_queue
Message Queue Control Blocks.
Definition: rtx_os.h:453
uint8_t flags
Object Flags.
Definition: rtx_os.h:240
osRtxThread_t * thread_list
Waiting Threads List.
Definition: rtx_os.h:186
osRtxObject_t ready
Ready List Object.
Definition: rtx_os.h:294
uint32_t tick
Tick counter.
Definition: rtx_os.h:286
const char * name
Object Name.
Definition: rtx_os.h:252
uint8_t lock
Lock counter.
Definition: rtx_os.h:190
struct osRtxThread_s * thread_join
Thread waiting to Join.
Definition: rtx_os.h:112
uint32_t max_blocks
Maximum number of Blocks.
Definition: rtx_os.h:214
int32_t tick_irqn
Tick Timer IRQ Number.
Definition: rtx_os.h:288
uint32_t block_size
Block Size.
Definition: rtx_os.h:216
osRtxMessageQueue_t * mq
Timer Message Queue.
Definition: rtx_os.h:308
uint16_t cnt
Item Count.
Definition: rtx_os.h:313
osRtxThread_t * thread_list
Waiting Threads List.
Definition: rtx_os.h:172
uint32_t tz_memory
TrustZone Memory Identifier.
Definition: rtx_os.h:125
uint8_t state
Object State.
Definition: rtx_os.h:151
uint32_t used_blocks
Number of used Blocks.
Definition: rtx_os.h:215
uint32_t msg_count
Number of queued Messages.
Definition: rtx_os.h:256
uint8_t reserved_state
Object State (not used)
Definition: rtx_os.h:239
uint8_t attr
Object Attributes.
Definition: rtx_os.h:184
struct osRtxTimer_s * next
Pointer to next active Timer.
Definition: rtx_os.h:156
uint32_t event_flags
Event Flags.
Definition: rtx_os.h:173
uint32_t thread_stack_size
Default Thread Stack Size.
Definition: rtx_os.h:455
void * mp_data
Memory Pool Data Memory.
Definition: rtx_os.h:327
uint8_t id
Object Identifier.
Definition: rtx_os.h:266
uint8_t flags
Object Flags.
Definition: rtx_os.h:152
osRtxMpInfo_t * memory_pool
Memory Pool Control Blocks.
Definition: rtx_os.h:338
uint32_t msg_size
Message Size.
Definition: rtx_os.h:255
uint8_t flags
Object Flags.
Definition: rtx_os.h:105
const char * name
Object Name.
Definition: rtx_os.h:185
OS Runtime Information structure.
Definition: rtx_os.h:278
volatile uint8_t blocked
Blocked.
Definition: rtx_os.h:283
uint32_t sp
Current Stack Pointer.
Definition: rtx_os.h:123
osRtxThread_t * owner_thread
Owner Thread.
Definition: rtx_os.h:187
osRtxMpInfo_t * memory_pool
Memory Pool Control Blocks.
Definition: rtx_os.h:452
const char * name
Object Name.
Definition: rtx_os.h:228
uint8_t state
Object State.
Definition: rtx_os.h:104
osRtxMpInfo_t * semaphore
Semaphore Control Blocks.
Definition: rtx_os.h:451
osRtxTimerFinfo_t finfo
Timer Function Info.
Definition: rtx_os.h:159
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.