diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-10 15:06:13 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-10 15:06:13 -0600 |
commit | 59702ad149099f5da9fc0fa434b3beeecd6e78e7 (patch) | |
tree | e1e3a3761ba921119fc3b0f48cf507fb93ff33f2 /nuttx/sched/wqueue | |
parent | a55c76b88fc937600c55d12b86f8e475ffb844b3 (diff) | |
download | nuttx-59702ad149099f5da9fc0fa434b3beeecd6e78e7.tar.gz nuttx-59702ad149099f5da9fc0fa434b3beeecd6e78e7.tar.bz2 nuttx-59702ad149099f5da9fc0fa434b3beeecd6e78e7.zip |
Fix a few bugs introduced in the last checkin
Diffstat (limited to 'nuttx/sched/wqueue')
-rw-r--r-- | nuttx/sched/wqueue/kwork_process.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nuttx/sched/wqueue/kwork_process.c b/nuttx/sched/wqueue/kwork_process.c index 1e878dc43..1943e3e5f 100644 --- a/nuttx/sched/wqueue/kwork_process.c +++ b/nuttx/sched/wqueue/kwork_process.c @@ -136,8 +136,6 @@ void work_process(FAR struct wqueue_s *wqueue) work = (FAR struct work_s *)wqueue->q.head; while (work) { - DEBUGASSERT(wqueue->wq_sem.count > 0); - /* Is this work ready? It is ready if there is no delay or if * the delay has elapsed. qtime is the time that the work was added * to the work queue. It will always be greater than or equal to @@ -223,10 +221,10 @@ void work_process(FAR struct wqueue_s *wqueue) /* Get the delay (in clock ticks) since we started the sampling */ - elapsed = clock_systimer() - work->qtime; + elapsed = clock_systimer() - stick; if (elapsed <= wqueue->delay) { - /* How must time would we need to delay to get to the end of the + /* How much time would we need to delay to get to the end of the * sampling period? The amount of time we delay should be the smaller * of the time to the end of the sampling period and the time to the * next work expiry. |