* @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 */
| 31 | * @note It must be called between rt_hw_interrupt_disable and rt_hw_interrupt_enable |
| 32 | */ |
| 33 | void 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. |
no test coverage detected