mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
wqueue: fix NO leave_critical_section() when only CONFIG_SCHED_HPWORK
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b128ce334f
commit
e5420c8eee
1 changed files with 6 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue