Tests SMP-specific semaphore behaviour.
More...
|
| T_TEST_CASE_FIXTURE (RtemsSemValSmp, &RtemsSemValSmp_Fixture) |
|
Tests SMP-specific semaphore behaviour.
This test case performs the following actions:
- Create a worker thread and a MrsP mutex. Use the mutex and the worker to perform a bad sticky thread queue enqueue.
- Create two worker threads, a MrsP mutex, and a priority inheritance mutex. Use the mutexes and the workers to raise the current priority to a higher priority than the ceiling priority of the mutex while one of the workers waits on the mutex.
- Let the first worker try to obtain the MrsP mutex. Check that it acquired the ceiling priority.
- Let the second worker try to obtain the priority inheritance mutex. Check that the first worker inherited the priority from the second worker.
- Set the real priority of the first worker. Check that it defines the current priority.
- Release the MrsP mutex so that the first worker can to obtain it. It will replace a temporary priority node which is the maximum priority node. This is the first scenario we want to test.
- Obtain the MrsP mutex for the runner thread to start the second scenario we would like to test.
- Let the first worker try to obtain the MrsP mutex. Check that it acquired the ceiling priority.
- Let the second worker try to obtain the priority inheritance mutex. Check that the first worker inherited the priority from the second worker.
- Lower the priority of the second worker. Check that the inherited priority of the first worker reflects this priority change.
- Change the real priority of the first worker so that it defines its current priority.
- Release the MrsP mutex so that the first worker can to obtain it. It will replace a temporary priority node which is between the minimum and maximum priority node. This is the second scenario we want to test.
- Clean up all used resources.