MCPcopy Index your code
hub / github.com/RT-Thread/rt-thread / rt_mutex_delete

Function rt_mutex_delete

src/ipc.c:1284–1299  ·  view source on GitHub ↗

* @brief This function will delete a mutex object and release this memory space. * * @note This function is used to delete a mutex object which is created by the rt_mutex_create() function. * By contrast, the rt_mutex_detach() function will detach a static mutex object. * When the mutex is successfully deleted, it will resume all suspended threads in the mutex list.

Source from the content-addressed store, hash-verified

1282 * ONLY USE the rt_mutex_detach() function to complete the detachment.
1283 */
1284rt_err_t rt_mutex_delete(rt_mutex_t mutex)
1285{
1286 /* parameter check */
1287 RT_ASSERT(mutex != RT_NULL);
1288 RT_ASSERT(rt_object_get_type(&mutex->parent.parent) == RT_Object_Class_Mutex);
1289 RT_ASSERT(rt_object_is_systemobject(&mutex->parent.parent) == RT_FALSE);
1290
1291 RT_DEBUG_NOT_IN_INTERRUPT;
1292
1293 _mutex_before_delete_detach(mutex);
1294
1295 /* delete mutex object */
1296 rt_object_delete(&(mutex->parent.parent));
1297
1298 return RT_EOK;
1299}
1300RTM_EXPORT(rt_mutex_delete);
1301#endif /* RT_USING_HEAP */
1302

Callers 15

_object_node_deleteFunction · 0.85
_pftx_destroy_lockedFunction · 0.85
_sftx_destroyFunction · 0.85
sys_mutex_createFunction · 0.85
usb_osal_mutex_deleteFunction · 0.85
dlmodule_destroyFunction · 0.85
check_createFunction · 0.85
__ARM_TPL_mutex_destroyFunction · 0.85
~arm_tpl_cvMethod · 0.85
sys_mutex_freeFunction · 0.85
free_socketFunction · 0.85
ff_del_syncobjFunction · 0.85

Calls 4

rt_object_get_typeFunction · 0.85
rt_object_deleteFunction · 0.85

Tested by 7

_ic_test_closeFunction · 0.68
test_dynamic_mutex_takeFunction · 0.68
test_dynamic_pri_reverseFunction · 0.68