* @brief set the prioceiling attribute of the mutex. * * @param mutex is a pointer to a mutex object. * * @return return the current priority ceiling of the mutex. */
| 1193 | * @return return the current priority ceiling of the mutex. |
| 1194 | */ |
| 1195 | rt_uint8_t rt_mutex_getprioceiling(rt_mutex_t mutex) |
| 1196 | { |
| 1197 | rt_uint8_t prio = 0xFF; |
| 1198 | |
| 1199 | /* parameter check */ |
| 1200 | RT_DEBUG_IN_THREAD_CONTEXT; |
| 1201 | RT_ASSERT(mutex != RT_NULL); |
| 1202 | |
| 1203 | if (mutex) |
| 1204 | { |
| 1205 | rt_spin_lock(&(mutex->spinlock)); |
| 1206 | prio = mutex->ceiling_priority; |
| 1207 | rt_spin_unlock(&(mutex->spinlock)); |
| 1208 | } |
| 1209 | |
| 1210 | return prio; |
| 1211 | } |
| 1212 | RTM_EXPORT(rt_mutex_getprioceiling); |
| 1213 | |
| 1214 |
nothing calls this directly
no test coverage detected