diff options
author | Lorenz Meier <lorenz@px4.io> | 2015-01-29 15:01:55 +0100 |
---|---|---|
committer | Lorenz Meier <lorenz@px4.io> | 2015-01-29 15:01:55 +0100 |
commit | 5a028df57aba8fe530a6f7c8341ae1c6208c575c (patch) | |
tree | 1445dc96670a5e0068686dba5a7b9d67ac100ba8 | |
parent | e4c914e261d2647e44d05222afa7aa3cc90d3c67 (diff) | |
parent | c06011fa1d48d84ca0e99c2e99cceae4b0d0e973 (diff) | |
download | nuttx-5a028df57aba8fe530a6f7c8341ae1c6208c575c.tar.gz nuttx-5a028df57aba8fe530a6f7c8341ae1c6208c575c.tar.bz2 nuttx-5a028df57aba8fe530a6f7c8341ae1c6208c575c.zip |
Merge pull request #44 from ultrasystem/patch-1
Update work_thread.c
-rw-r--r-- | nuttx/libc/wqueue/work_thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nuttx/libc/wqueue/work_thread.c b/nuttx/libc/wqueue/work_thread.c index b534ab46d..6ef8a874b 100644 --- a/nuttx/libc/wqueue/work_thread.c +++ b/nuttx/libc/wqueue/work_thread.c @@ -175,7 +175,8 @@ static void work_process(FAR struct wqueue_s *wqueue) * scheduled wakeup interval? */ - remaining = elapsed - work->delay; + /* Here: elapsed < work->delay */ + remaining = work->delay - elapsed; if (remaining < next) { /* Yes.. Then schedule to wake up when the work is ready */ |