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

Function rt_thread_defunct_enqueue

src/defunct.c:33–42  ·  view source on GitHub ↗

* @brief Enqueue a thread to defunct queue. * * @param thread the thread to be enqueued. * * @note It must be called between rt_hw_interrupt_disable and rt_hw_interrupt_enable */

Source from the content-addressed store, hash-verified

31 * @note It must be called between rt_hw_interrupt_disable and rt_hw_interrupt_enable
32 */
33void rt_thread_defunct_enqueue(rt_thread_t thread)
34{
35 rt_base_t level;
36 level = rt_spin_lock_irqsave(&_defunct_spinlock);
37 rt_list_insert_after(&_rt_thread_defunct, &RT_THREAD_LIST_NODE(thread));
38 rt_spin_unlock_irqrestore(&_defunct_spinlock, level);
39#if defined(RT_USING_SMP) || defined(RT_USING_SMART)
40 rt_sem_release(&system_sem);
41#endif
42}
43
44/**
45 * @brief Dequeue a thread from defunct queue.

Callers 2

_thread_exitFunction · 0.85
_thread_detachFunction · 0.85

Calls 4

rt_list_insert_afterFunction · 0.85
rt_sem_releaseFunction · 0.85
rt_spin_lock_irqsaveFunction · 0.70

Tested by

no test coverage detected