Browse Source

[revert] workqueue RT_THREAD_SUSPEND flag

guozhanxin 2 năm trước cách đây
mục cha
commit
1b3d287cee
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      components/drivers/ipc/workqueue.c

+ 3 - 3
components/drivers/ipc/workqueue.c

@@ -108,7 +108,7 @@ static rt_err_t _workqueue_submit_work(struct rt_workqueue *queue,
 
         /* whether the workqueue is doing work */
         if (queue->work_current == RT_NULL &&
-                ((queue->work_thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_SUSPEND))
+                ((queue->work_thread->stat & RT_THREAD_SUSPEND_MASK) == RT_THREAD_SUSPEND_MASK))
         {
             /* resume work thread */
             rt_thread_resume(queue->work_thread);
@@ -190,7 +190,7 @@ static void _delayed_work_timeout_handler(void *parameter)
     }
     /* whether the workqueue is doing work */
     if (queue->work_current == RT_NULL &&
-            ((queue->work_thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_SUSPEND))
+            ((queue->work_thread->stat & RT_THREAD_SUSPEND_MASK) == RT_THREAD_SUSPEND_MASK))
     {
         /* resume work thread */
         rt_thread_resume(queue->work_thread);
@@ -348,7 +348,7 @@ rt_err_t rt_workqueue_urgent_work(struct rt_workqueue *queue, struct rt_work *wo
     rt_list_insert_after(&queue->work_list, &(work->list));
     /* whether the workqueue is doing work */
     if (queue->work_current == RT_NULL &&
-            ((queue->work_thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_SUSPEND))
+            ((queue->work_thread->stat & RT_THREAD_SUSPEND_MASK) == RT_THREAD_SUSPEND_MASK))
     {
         /* resume work thread */
         rt_thread_resume(queue->work_thread);