CMSIS-RTOS2 Validation  Version 0.9.0-dev77
Validates RTOS2 API Implementation
Mutex Functions

Mutex Functions Test Cases. More...

Functions

void TC_osMutexNew_1 (void)
 Test case: TC_osMutexNew_1. More...
 
void TC_osMutexNew_2 (void)
 Test case: TC_osMutexNew_2. More...
 
void TC_osMutexNew_3 (void)
 Test case: TC_osMutexNew_3. More...
 
void TC_osMutexNew_4 (void)
 Test case: TC_osMutexNew_4. More...
 
void TC_osMutexNew_5 (void)
 Test case: TC_osMutexNew_5. More...
 
void TC_osMutexNew_6 (void)
 Test case: TC_osMutexNew_6. More...
 
void TC_osMutexGetName_1 (void)
 Test case: TC_osMutexGetName_1. More...
 
void TC_osMutexAcquire_1 (void)
 Test case: TC_osMutexAcquire_1. More...
 
void TC_osMutexAcquire_2 (void)
 Test case: TC_osMutexAcquire_2. More...
 
void TC_osMutexRelease_1 (void)
 Test case: TC_osMutexRelease_1. More...
 
void TC_osMutexGetOwner_1 (void)
 Test case: TC_osMutexGetOwner_1. More...
 
void TC_osMutexDelete_1 (void)
 Test case: TC_osMutexDelete_1. More...
 
void TC_MutexRobust (void)
 Test case: TC_MutexRobust. More...
 
void TC_MutexPrioInherit (void)
 Test case: TC_MutexPrioInherit. More...
 
void TC_MutexCheckTimeout (void)
 Test case: TC_MutexCheckTimeout. More...
 
void TC_MutexNestedAcquire (void)
 Test case: TC_MutexNestedAcquire. More...
 
void TC_MutexPriorityInversion (void)
 Test case: TC_MutexPriorityInversion. More...
 
void TC_MutexOwnership (void)
 Test case: TC_MutexOwnership. More...
 
void TC_MutexAllocation (void)
 Test case: TC_MutexAllocation. More...
 

Description

The test cases check the osMutex* functions.

Function Documentation

◆ TC_MutexAllocation()

void TC_MutexAllocation ( void  )
  • Test mutex object allocation

◆ TC_MutexCheckTimeout()

void TC_MutexCheckTimeout ( void  )
  • Set time thresholds
  • Create wakeup thread to acquire and release a mutex after 10 ticks
  • Wait for a mutex with a defined timeout
  • Check if the mutex is acquired between the minimum and maximum thresholds
  • Wait for a mutex with an infinite timeout
  • Check if the mutex is acquired between the minimum and maximum thresholds

◆ TC_MutexNestedAcquire()

void TC_MutexNestedAcquire ( void  )
  • Create a mutex object
  • Obtain a mutex object
  • Create a high priority thread that waits for the same mutex
  • Recursively acquire and release a mutex object
  • Release a mutex
  • Verify that every subsequent call released the mutex
  • Delete a mutex object
  • Mutex object must be released after each acquisition

◆ TC_MutexOwnership()

void TC_MutexOwnership ( void  )
  • Create a mutex object
  • Create a child thread and wait until acquires mutex
  • Create a child thread that tries to release a mutex
  • Only thread that obtains a mutex can release it.

◆ TC_MutexPrioInherit()

void TC_MutexPrioInherit ( void  )
  • Test mutex prio inherit attribute

◆ TC_MutexPriorityInversion()

void TC_MutexPriorityInversion ( void  )
  • Set priority of the control thread to normal
  • Create low priority thread, which will acquire mutex
  • Wait until low priority thread acquires mutex
  • Raise priority of the control thread
  • Create high priority thread, which will wait for a mutex
  • Allow high priority job to wait for mutex
  • Create medium priority thread
  • Set priority of the control thread to be the lowest of all
  • Wait until all jobs finish
  • Verify thread execution order
  • Thread execution order must be: Low, High, Medium

◆ TC_MutexRobust()

void TC_MutexRobust ( void  )
  • Test mutex robust attribute

◆ TC_osMutexAcquire_1()

void TC_osMutexAcquire_1 ( void  )
  • Call osMutexAcquire to acquire the mutex from the running thread
  • Call osMutexAcquire from ISR
  • Call osMutexAcquire with null mutex object

◆ TC_osMutexAcquire_2()

void TC_osMutexAcquire_2 ( void  )
  • Call osMutexAcquire without timeout and try to acquire already owned mutex
  • Call osMutexAcquire with timeout and wait to acquire already owned mutex

◆ TC_osMutexDelete_1()

void TC_osMutexDelete_1 ( void  )
  • Call osMutexDelete to delete a mutex
  • Call osMutexDelete from ISR
  • Call osMutexDelete with null object

◆ TC_osMutexGetName_1()

void TC_osMutexGetName_1 ( void  )
  • Call osMutexGetName to retrieve a name of an unnamed mutex
  • Call osMutexGetName to retrieve a name of a mutex with assigned name
  • Call osMutexGetName from ISR
  • Call osMutexGetName with null object

◆ TC_osMutexGetOwner_1()

void TC_osMutexGetOwner_1 ( void  )
  • Call osMutexGetOwner when the mutex is not locked
  • Call osMutexGetOwner when the mutex is locked
  • Call osMutexGetOwner from ISR
  • Call osMutexGetOwner with null object

◆ TC_osMutexNew_1()

void TC_osMutexNew_1 ( void  )
  • Call osMutexNew to create a mutex object
  • Call osMutexNew from ISR

◆ TC_osMutexNew_2()

void TC_osMutexNew_2 ( void  )
  • Call osMutexNew to create a recursive mutex object

◆ TC_osMutexNew_3()

void TC_osMutexNew_3 ( void  )
  • Call osMutexNew to create a mutex object that uses priority inheritance protocol

◆ TC_osMutexNew_4()

void TC_osMutexNew_4 ( void  )
  • Call osMutexNew to create a robust mutex object

◆ TC_osMutexNew_5()

void TC_osMutexNew_5 ( void  )
  • Call osMutexNew to create mutex object and assign a name to it

◆ TC_osMutexNew_6()

void TC_osMutexNew_6 ( void  )
  • Call osMutexNew to create mutex object by specifying memory for control block in attributes

◆ TC_osMutexRelease_1()

void TC_osMutexRelease_1 ( void  )
  • Call osMutexRelease to release acquired mutex
  • Call osMutexRelease to release mutex that was not acquired
  • Call osMutexRelease from ISR
  • Call osMutexRelease with null mutex object