CMSIS-RTOS Validation  Version 1.0
RTOS Validation
 All Data Structures Files Functions Variables Macros Groups Pages
Thread Functions

Thread Functions Test Cases. More...

Functions

void TC_ThreadCreate (void)
 Test case: TC_ThreadCreate. More...
 
void TC_ThreadMultiInstance (void)
 Test case: TC_ThreadMultiInstance. More...
 
void TC_ThreadTerminate (void)
 Test case: TC_ThreadTerminate. More...
 
void TC_ThreadRestart (void)
 Test case: TC_ThreadRestart. More...
 
void TC_ThreadGetId (void)
 Test case: TC_ThreadGetId. More...
 
void TC_ThreadPriority (void)
 Test case: TC_ThreadPriority. More...
 
void TC_ThreadPriorityExec (void)
 Test case: TC_ThreadPriorityExec. More...
 
void TC_ThreadChainedCreate (void)
 Test case: TC_ThreadChainedCreate. More...
 
void TC_ThreadYield (void)
 Test case: TC_ThreadYield. More...
 
void TC_ThreadParam (void)
 Test case: TC_ThreadParam. More...
 
void TC_ThreadInterrupts (void)
 Test case: TC_ThreadInterrupts. More...
 

Description

The test cases check the osThread* functions.

Function Documentation

void TC_ThreadChainedCreate ( void  )
  • Create a first thread in a chain
  • Wait until child threads are created
  • Verify that all child threads were created
void TC_ThreadCreate ( void  )
  • Create threads with different priorities and pass NULL argument to them
  • Create threads with different priorities and pass valid argument to them
void TC_ThreadGetId ( void  )
  • Create multiple threads
  • Each thread must call osThreadGetId and return its thread ID to the main thread
  • Check if each thread returned correct ID
  • osThreadGetId must return same ID as obtained by osThreadCreate
void TC_ThreadInterrupts ( void  )
  • Call all thread management functions from the ISR
void TC_ThreadMultiInstance ( void  )
  • Synchronise on time slice
  • Create all defined instances of a thread
  • Verify each instance id
  • Wait until all instances executed
  • Verify execution variable
void TC_ThreadParam ( void  )
  • Test thread management functions with invalid parameters
void TC_ThreadPriority ( void  )
  • Change priority of the main thread in steps from Idle to Realtime
  • At each step check if priority was changed
  • Do the same for main child thread
void TC_ThreadPriorityExec ( void  )
  • Raise main thread priority to osPriorityRealtime
  • Create multiple instances of the test thread
  • Set instance priorities from low to realtime
  • Lower main thread priority to allow execution of test threads
  • Check if threads were executed according to their priorities
void TC_ThreadRestart ( void  )
  • Create a counting thread and verify that it runs
  • Terminate counting thread
  • Recreate a counting thread and verify that is runs again
void TC_ThreadTerminate ( void  )
  • Initialize global counter variable to zero
  • Create and run a test thread which increments a global counter
  • Terminate test thread and remember counter value
  • Wait and verify that thread is terminated by checking global counter
  • Restart a thread and repeat the procedure
  • Counter must not increment after test thread is terminated
void TC_ThreadYield ( void  )
  • Raise priority of the main thread
  • Create child thread instances with normal priority
  • Lower priority of the main thread to allow child threads to run
  • When child threads terminate, check counter values
  • Restore priority of the main thread