CMSIS-RTOS2  Version 2.1.3
Real-Time Operating System: API and RTX Reference Implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Thread Flags Functions

Events generated by thread flags functions. More...

Functions

void EvrRtxThreadFlagsError (osThreadId_t thread_id, int32_t status)
 Event on thread flags error (Error) More...
 
void EvrRtxThreadFlagsSet (osThreadId_t thread_id, uint32_t flags)
 Event on thread flags set (API) More...
 
void EvrRtxThreadFlagsSetDone (osThreadId_t thread_id, uint32_t thread_flags)
 Event on successful thread flags set (Op) More...
 
void EvrRtxThreadFlagsClear (uint32_t flags)
 Event on thread flags clear (API) More...
 
void EvrRtxThreadFlagsClearDone (uint32_t thread_flags)
 Event on successful thread flags clear (Op) More...
 
void EvrRtxThreadFlagsGet (uint32_t thread_flags)
 Event on thread flags retrieve (API) More...
 
void EvrRtxThreadFlagsWait (uint32_t flags, uint32_t options, uint32_t timeout)
 Event on wait for thread flags (API) More...
 
void EvrRtxThreadFlagsWaitPending (uint32_t flags, uint32_t options, uint32_t timeout)
 Event on pending wait for thread flags (Op) More...
 
void EvrRtxThreadFlagsWaitTimeout (osThreadId_t thread_id)
 Event on wait timeout for thread flags (Op) More...
 
void EvrRtxThreadFlagsWaitCompleted (uint32_t flags, uint32_t options, uint32_t thread_flags, osThreadId_t thread_id)
 Event on successful wait for thread flags (Op) More...
 
void EvrRtxThreadFlagsWaitNotCompleted (uint32_t flags, uint32_t options)
 Event on unsuccessful wait for thread flags (Op) More...
 

Description

Function Documentation

void EvrRtxThreadFlagsError ( osThreadId_t  thread_id,
int32_t  status 
)
Parameters
[in]thread_idthread ID obtained by osThreadNew or osThreadGetId or NULL when ID is unknown.
[in]statusextended execution status.

The event ThreadFlagsError is generated when Thread Flags routines complete their execution due to an error.

The status parameter indicates the execution status and can be one of the osStatus_t codes or one of the extended execution status codes which are summarized in the table below.

Extended Status Code Description
osRtxErrorKernelNotReady Kernel scheduler is not in Ready state.
osRtxErrorKernelNotRunning Kernel scheduler is not executing - there is no running thread.
osRtxErrorInvalidControlBlock Object control block with invalid alignment or size was specified.
osRtxErrorInvalidDataMemory Object data memory with invalid alignment or size was specified.
osRtxErrorInvalidThreadStack Thread stack memory with invalid alignment or size was specified.
osRtxErrorInvalidPriority Invalid thread priority was specified.
osRtxErrorThreadNotJoinable Specified thread is not joinable.
osRtxErrorMutexNotOwned Specified mutex is not owned by the current running thread.
osRtxErrorMutexNotLocked Specified mutex is not locked.
osRtxErrorMutexLockLimit Maximum number of recursive mutex locks reached.
osRtxErrorSemaphoreCountLimit Semaphore count limit reached.
osRtxErrorTZ_InitContext_S Secure context memory system initialization failed.
osRtxErrorTZ_AllocContext_S Secure context memory allocation failed.
osRtxErrorTZ_FreeContext_S Secure context memory deallocation failed.
osRtxErrorTZ_LoadContext_S Secure context load failed.
osRtxErrorTZ_SaveContext_S Secure context save failed.

Value in the Event Recorder shows:

  • thread_id : thread ID.
  • status : execution status code.
void EvrRtxThreadFlagsSet ( osThreadId_t  thread_id,
uint32_t  flags 
)
Parameters
[in]thread_idthread ID obtained by osThreadNew or osThreadGetId.
[in]flagsflags of the thread that shall be set.

The event ThreadFlagsSet is generated when the function osThreadFlagsSet is called.

Value in the Event Recorder shows:

  • thread_id : thread ID.
  • flags : flags that shall be set.
void EvrRtxThreadFlagsSetDone ( osThreadId_t  thread_id,
uint32_t  thread_flags 
)
Parameters
[in]thread_idthread ID obtained by osThreadNew or osThreadGetId.
[in]thread_flagsthread flags after setting.

The event ThreadFlagsSetDone is generated when thread flags are successfully set.

Value in the Event Recorder shows:

  • thread_id : thread ID.
  • thread_flags : thread flags after setting.
void EvrRtxThreadFlagsClear ( uint32_t  flags)
Parameters
[in]flagsflags of the thread that shall be cleared.

The event ThreadFlagsClear is generated when the function osThreadFlagsClear is called.

Value in the Event Recorder shows:

  • flags : flags that shall be cleared.
void EvrRtxThreadFlagsClearDone ( uint32_t  thread_flags)
Parameters
[in]thread_flagsthread flags before clearing.

The event ThreadFlagsClearDone is generated when the function osThreadFlagsClear successfully clears thread flags.

Value in the Event Recorder shows:

  • thread_flags : thread flags before clearing.
void EvrRtxThreadFlagsGet ( uint32_t  thread_flags)
Parameters
[in]thread_flagscurrent thread flags.

The event ThreadFlagsGet is generated when the function osThreadFlagsGet is called and its execution result is known.

Value in the Event Recorder shows:

  • thread_flags : current thread flags.
void EvrRtxThreadFlagsWait ( uint32_t  flags,
uint32_t  options,
uint32_t  timeout 
)
Parameters
[in]flagsflags to wait for.
[in]optionsflags options (osFlagsXxxx).
[in]timeoutTimeout Value or 0 in case of no time-out.

The event ThreadFlagsWait is generated when the function osThreadFlagsWait is called.

Value in the Event Recorder shows:

void EvrRtxThreadFlagsWaitPending ( uint32_t  flags,
uint32_t  options,
uint32_t  timeout 
)
Parameters
[in]flagsflags to wait for.
[in]optionsflags options (osFlagsXxxx).
[in]timeoutTimeout Value or 0 in case of no time-out.

The event ThreadFlagsWaitPending is generated when the function osThreadFlagsWait starts waiting for thread flags to become signaled.

Value in the Event Recorder shows:

void EvrRtxThreadFlagsWaitTimeout ( osThreadId_t  thread_id)
Parameters
[in]thread_idthread ID obtained by osThreadNew or osThreadGetId.

The event ThreadFlagsWaitTimeout is generated when wait for thread flags to become signaled is aborted due to expired wait timeout.

Value in the Event Recorder shows:

  • thread_id : thread ID.
void EvrRtxThreadFlagsWaitCompleted ( uint32_t  flags,
uint32_t  options,
uint32_t  thread_flags,
osThreadId_t  thread_id 
)
Parameters
[in]flagsflags to wait for.
[in]optionsflags options (osFlagsXxxx).
[in]thread_flagsthread flags before clearing.
[in]thread_idthread ID obtained by osThreadNew or osThreadGetId.

The event ThreadFlagsWaitCompleted is generated when waiting for thread flags ends because requested flags were signaled.

Value in the Event Recorder shows:

  • flags : flags thread was waiting for.
  • option : flags options (refer to thread flags options).
  • thread_flags : thread flags before clearing.
  • thread_id : thread ID.
void EvrRtxThreadFlagsWaitNotCompleted ( uint32_t  flags,
uint32_t  options 
)
Parameters
[in]flagsflags to wait for.
[in]optionsflags options (osFlagsXxxx).

The event ThreadFlagsWaitNotCompleted is generated when the function osThreadFlagsWait returns without timeout and specified thread flags were not signaled.

Value in the Event Recorder shows: