MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_mutex_getprioceiling

Function rt_mutex_getprioceiling

src/ipc.c:1195–1211  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

1193 * @return return the current priority ceiling of the mutex.
1194 */
1195rt_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}
1212RTM_EXPORT(rt_mutex_getprioceiling);
1213
1214

Callers

nothing calls this directly

Calls 2

rt_spin_lockFunction · 0.70
rt_spin_unlockFunction · 0.70

Tested by

no test coverage detected