diff options
| author | tangyuxin <[email protected]> | 2021-02-01 14:31:45 +0800 |
|---|---|---|
| committer | tangyuxin <[email protected]> | 2021-02-01 15:02:19 +0800 |
| commit | 5b52e6c7e315d25c5a492d5460442e6e3f5c5631 (patch) | |
| tree | fb8979ca947f8b2fbb38d6edb07b1d6afecce553 /components/drivers/src/workqueue.c | |
| parent | 5a16a2060e5c330066d6d7c499c04d27277b9ae4 (diff) | |
修复同步取消锁中断等信号的问题
Diffstat (limited to 'components/drivers/src/workqueue.c')
| -rw-r--r-- | components/drivers/src/workqueue.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/components/drivers/src/workqueue.c b/components/drivers/src/workqueue.c index 6e8683c9b9..5c497cd5c8 100644 --- a/components/drivers/src/workqueue.c +++ b/components/drivers/src/workqueue.c @@ -306,12 +306,9 @@ rt_err_t rt_workqueue_cancel_work(struct rt_workqueue *queue, struct rt_work *wo rt_err_t rt_workqueue_cancel_work_sync(struct rt_workqueue *queue, struct rt_work *work) { - rt_base_t level; - RT_ASSERT(queue != RT_NULL); RT_ASSERT(work != RT_NULL); - level = rt_hw_interrupt_disable(); if (queue->work_current == work) /* it's current work in the queue */ { /* wait for work completion */ @@ -319,10 +316,8 @@ rt_err_t rt_workqueue_cancel_work_sync(struct rt_workqueue *queue, struct rt_wor } else { - rt_list_remove(&(work->list)); + _workqueue_cancel_work(work); } - work->flags &= ~RT_WORK_STATE_PENDING; - rt_hw_interrupt_enable(level); return RT_EOK; } |
