You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/12/23 08:27:45 UTC

[incubator-nuttx] branch master updated: wqueue: fix NO leave_critical_section() when only CONFIG_SCHED_HPWORK

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new e5420c8  wqueue: fix NO leave_critical_section() when only CONFIG_SCHED_HPWORK
e5420c8 is described below

commit e5420c8eee5f60576923d2dbc7fdf90ad15140e9
Author: ligd <li...@xiaomi.com>
AuthorDate: Wed Dec 22 13:26:10 2021 +0800

    wqueue: fix NO leave_critical_section() when only CONFIG_SCHED_HPWORK
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 sched/wqueue/kwork_queue.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sched/wqueue/kwork_queue.c b/sched/wqueue/kwork_queue.c
index 1b868f1..159fc6c 100644
--- a/sched/wqueue/kwork_queue.c
+++ b/sched/wqueue/kwork_queue.c
@@ -108,6 +108,7 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
                FAR void *arg, clock_t delay)
 {
   irqstate_t flags;
+  int ret = OK;
 
   /* Remove the entry from the timer and work queue. */
 
@@ -160,11 +161,15 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
                    (wdparm_t)work);
         }
     }
+  else
 #endif
+    {
+      ret = -EINVAL;
+    }
 
   leave_critical_section(flags);
 
-  return OK;
+  return ret;
 }
 
 #endif /* CONFIG_SCHED_WORKQUEUE */