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

Function rt_thread_delete

src/thread.c:600–608  ·  view source on GitHub ↗

* @brief This function will delete a thread. The thread object will be removed from * thread queue and deleted from system object management in the idle thread. * * @param thread Handle of the thread to be deleted. * * @return Return the operation status. If the return value is `RT_EOK`, the * function is successfully executed. * If the return value is any ot

Source from the content-addressed store, hash-verified

598 * If the return value is any other values, it means this operation failed.
599 */
600rt_err_t rt_thread_delete(rt_thread_t thread)
601{
602 /* parameter check */
603 RT_ASSERT(thread != RT_NULL);
604 RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
605 RT_ASSERT(rt_object_is_systemobject((rt_object_t)thread) == RT_FALSE);
606
607 return _thread_detach(thread);
608}
609RTM_EXPORT(rt_thread_delete);
610#endif /* RT_USING_HEAP */
611

Callers 15

_thread_exitFunction · 0.85
lwp_exitFunction · 0.85
_wait_sibling_exitFunction · 0.85
_sys_cloneFunction · 0.85
_sys_forkFunction · 0.85
sys_thread_deleteFunction · 0.85
sdio_irq_thread_deleteFunction · 0.85
mic_device_stopFunction · 0.85
player_device_stopFunction · 0.85
usb_osal_thread_deleteFunction · 0.85
rt_workqueue_destroyFunction · 0.85
done_safelyFunction · 0.85

Calls 3

rt_object_get_typeFunction · 0.85
_thread_detachFunction · 0.85

Tested by 15

sys_run_dirFunction · 0.68
gpio_output_testFunction · 0.68
gpio_input_testFunction · 0.68
usbd_testFunction · 0.68
sys_run_dirFunction · 0.68
gpio_output_testFunction · 0.68
gpio_input_testFunction · 0.68
usbd_testFunction · 0.68
sys_run_dirFunction · 0.68
gpio_output_testFunction · 0.68
gpio_input_testFunction · 0.68
usbd_testFunction · 0.68