Mutex Functions Test Cases.
More...
The test cases check the osMutex* functions.
void TC_MutexBasic |
( |
void |
| ) |
|
- Create a mutex object
- Try to release mutex that was not obtained before
- Obtain a mutex object
- Release a mutex object
- Delete a mutex object
void TC_MutexInterrupts |
( |
void |
| ) |
|
- Call all mutex management functions from the ISR
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
void TC_MutexOwnership |
( |
void |
| ) |
|
- Create a mutex object
- Create a child thread and wait until acquires mutex
- Create a child thread that trys to release a mutex
- Only thread that obtains a mutex can release it.
void TC_MutexParam |
( |
void |
| ) |
|
- Test mutex management functions with invalid parameters
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
void TC_MutexTimeout |
( |
void |
| ) |
|
- Create and initialize a mutex object
- Create a thread that acquires a mutex but never release it
- Wait for mutex release until timeout