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

Function rt_thread_detach

src/thread.c:485–493  ·  view source on GitHub ↗

* @brief This function will detach a thread. The thread object will be removed from * thread queue and detached/deleted from the system object management. * * @param thread Handle of the thread to be deleted. The thread must be * initialized by `rt_thread_init()`. * * @return Return the operation status. If the return value is `RT_EOK`, the * function

Source from the content-addressed store, hash-verified

483 * If the return value is any other values, it means this operation failed.
484 */
485rt_err_t rt_thread_detach(rt_thread_t thread)
486{
487 /* parameter check */
488 RT_ASSERT(thread != RT_NULL);
489 RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
490 RT_ASSERT(rt_object_is_systemobject((rt_object_t)thread));
491
492 return _thread_detach(thread);
493}
494RTM_EXPORT(rt_thread_detach);
495
496static rt_err_t _thread_detach(rt_thread_t thread)

Callers 7

pthread_createFunction · 0.85
pthread_exitFunction · 0.85
pthread_cancelFunction · 0.85
rt_thread_controlFunction · 0.85
hooklist_testFunction · 0.85
utest_tc_cleanupFunction · 0.85
test_static_threadFunction · 0.85

Calls 3

rt_object_get_typeFunction · 0.85
_thread_detachFunction · 0.85

Tested by 1

test_static_threadFunction · 0.68