iterate over each suspended thread to update highest priority in pending threads */
| 826 | #ifdef RT_USING_MUTEX |
| 827 | /* iterate over each suspended thread to update highest priority in pending threads */ |
| 828 | rt_inline rt_uint8_t _mutex_update_priority(struct rt_mutex *mutex) |
| 829 | { |
| 830 | struct rt_thread *thread; |
| 831 | |
| 832 | if (!rt_list_isempty(&mutex->parent.suspend_thread)) |
| 833 | { |
| 834 | thread = RT_THREAD_LIST_NODE_ENTRY(mutex->parent.suspend_thread.next); |
| 835 | mutex->priority = rt_sched_thread_get_curr_prio(thread); |
| 836 | } |
| 837 | else |
| 838 | { |
| 839 | mutex->priority = 0xff; |
| 840 | } |
| 841 | |
| 842 | return mutex->priority; |
| 843 | } |
| 844 | |
| 845 | /* get highest priority inside its taken object and its init priority */ |
| 846 | rt_inline rt_uint8_t _thread_get_mutex_priority(struct rt_thread* thread) |
no test coverage detected