From 438e3e1a902f9f1b640199c925636ba7a8d8e882 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 10 Oct 2014 15:06:13 -0600 Subject: [PATCH] Fix a few bugs introduced in the last checkin --- sched/wqueue/kwork_process.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sched/wqueue/kwork_process.c b/sched/wqueue/kwork_process.c index 1e878dc432..1943e3e5fd 100644 --- a/sched/wqueue/kwork_process.c +++ b/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.