Warning, /testsuites/sptests/spsem01/spsem01.doc is written in an unsupported language. File is not indexed.
0001 This test exposes a potential priority inversion when priority inheritance is
0002 used and multiple locks are acquired by a low priority task. The scenario
0003 consists of 2 tasks of different priority and 2 semaphore/mutexes using
0004 priority inheritance. The scenario is:
0005
0006 Task 1 has priority 36. Task 2 has priority 34.
0007
0008 1. Task 1 obtains semaphore S1.
0009 2. Task 1 obtains semaphore S2
0010 3. Task 2 preempts Task 1.
0011 4. Task 2 blocks on S2. Task 1 inherits priority 34.
0012 5. Task 1 resumes. Task 1 releases S2. Task 1 continues to run at priority 34.
0013 6. Task 1 releases S1. Task 1 changes priority back to 36.
0014 7. Task 2 now preempts Task 1 and begins operating again.
0015
0016 During steps 5-6 Task 1 executes when Task 2 should be able to execute.
0017
0018 Stepping down the priority of Task 1 when it releases S2 back to its original
0019 priority when it obtained S2 fixes the priority inversion.