[workqueue] 队列销毁时取消所有工作并释放内核对象
This commit is contained in:
parent
d6b44ca52e
commit
3ef3fb50af
|
@ -231,7 +231,9 @@ rt_err_t rt_workqueue_destroy(struct rt_workqueue *queue)
|
|||
{
|
||||
RT_ASSERT(queue != RT_NULL);
|
||||
|
||||
rt_workqueue_cancel_all_work();
|
||||
rt_thread_delete(queue->work_thread);
|
||||
rt_sem_detach(&(queue->sem));
|
||||
RT_KERNEL_FREE(queue);
|
||||
|
||||
return RT_EOK;
|
||||
|
|
Loading…
Reference in New Issue