Hi,
    I have some questions about rtems priority inherit policy.
    Question 1:
        Assuming that:task1(priority 7)、task2(priority 4)、mutex1(rtems mutex use inherit).
task1 and task2 using mutex1 for resources mutex. After get mutex1, task1 will temp change it's priority  to 3 do something, and recover it's priority after things done.
        step1:task1 get mutex1 successfully;
        step2:task2 running attemp to get mutex1, it will promote task1's priority to 4 because of priority inherit policy;
        step3:task1 continue running with priority 4;
        step4:task1 call rtems_task_get_priority to get current priority, it will return 4, save as old priority;
        step5:task1 temp change(rtems_task_set_priority) self priority to 3;
        step6:task1 resume step4's priority(rtems_task_set_priority), it will set 4 to task1, rather than priority 7.
    So, i want to provide a intf function to get rtems task Real priority rather than current priority to solve this problem.

    Question 2:
        Assuming that:task1(priority 7)、task2(priority 4)、mutex1(rtems mutex use inherit)、semaphore1(use priority ceiling and it's priority is 6).
task1 and task2 using mutex1 for resources mutex. After get mutex1, task1 will continue get semaphore1, however task2 will never attempt to get semaphore1.
        step1:task1 get mutex1 successfully;
        step2:task2 running and attemp to get mutex1, it will promote task1's priority to 4 because of priority inherit policy;
        step3:task1 continue running and attempt to get semaphore1(ceiling priority is 6), rtems_semaphore_obtain will return failed because of task1 priority is greater than semaphore1. 
    So, occasionally task1 get semaphore1 failed.

regards
---
Tianye Ye
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to