From af45954690245413dc539c99195ae516e2e5d0e1 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Tue, 2 Jun 2015 01:06:18 -0700 Subject: [PATCH] POSIX: hrt_work_lock.h to hrt_work.h The header file now contains all hrt workqueue related prototypes. Signed-off-by: Mark Charlebois --- src/platforms/posix/px4_layer/drv_hrt.c | 2 +- src/platforms/posix/px4_layer/hrt_queue.c | 2 +- src/platforms/posix/px4_layer/hrt_thread.c | 2 +- src/platforms/posix/px4_layer/hrt_work_cancel.c | 16 +++++----------- src/platforms/posix/px4_layer/px4_posix_impl.cpp | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/platforms/posix/px4_layer/drv_hrt.c b/src/platforms/posix/px4_layer/drv_hrt.c index e8a986edce..6c8495ce57 100644 --- a/src/platforms/posix/px4_layer/drv_hrt.c +++ b/src/platforms/posix/px4_layer/drv_hrt.c @@ -42,7 +42,7 @@ #include #include #include -#include "hrt_work_lock.h" +#include "hrt_work.h" static struct sq_queue_s callout_queue; diff --git a/src/platforms/posix/px4_layer/hrt_queue.c b/src/platforms/posix/px4_layer/hrt_queue.c index 87f0372021..ab10714776 100644 --- a/src/platforms/posix/px4_layer/hrt_queue.c +++ b/src/platforms/posix/px4_layer/hrt_queue.c @@ -47,7 +47,7 @@ #include #include #include -#include "hrt_work_lock.h" +#include "hrt_work.h" #ifdef CONFIG_SCHED_WORKQUEUE diff --git a/src/platforms/posix/px4_layer/hrt_thread.c b/src/platforms/posix/px4_layer/hrt_thread.c index f5502b1070..fc4f49900d 100644 --- a/src/platforms/posix/px4_layer/hrt_thread.c +++ b/src/platforms/posix/px4_layer/hrt_thread.c @@ -46,7 +46,7 @@ #include #include #include -#include "hrt_work_lock.h" +#include "hrt_work.h" /**************************************************************************** * Pre-processor Definitions diff --git a/src/platforms/posix/px4_layer/hrt_work_cancel.c b/src/platforms/posix/px4_layer/hrt_work_cancel.c index 9d6c167593..c1c2c3bef7 100644 --- a/src/platforms/posix/px4_layer/hrt_work_cancel.c +++ b/src/platforms/posix/px4_layer/hrt_work_cancel.c @@ -41,7 +41,7 @@ #include #include #include -#include "hrt_work_lock.h" +#include "hrt_work.h" /**************************************************************************** * Pre-processor Definitions @@ -68,26 +68,21 @@ ****************************************************************************/ /**************************************************************************** - * Name: work_cancel + * Name: hrt_work_cancel * * Description: * Cancel previously queued work. This removes work from the work queue. - * After work has been canceled, it may be re-queue by calling work_queue() - * again. + * After work has been canceled, it may be re-queue by calling + * hrt_work_queue() again. * * Input parameters: - * qid - The work queue ID * work - The previously queue work structure to cancel * - * Returned Value: - * Zero on success, a negated errno on failure - * ****************************************************************************/ -int hrt_work_cancel(struct work_s *work) +void hrt_work_cancel(struct work_s *work) { struct wqueue_s *wqueue = &g_hrt_work; - //irqstate_t flags; //DEBUGASSERT(work != NULL && (unsigned)qid < NWORKERS); @@ -113,5 +108,4 @@ int hrt_work_cancel(struct work_s *work) } hrt_work_unlock(); - return PX4_OK; } diff --git a/src/platforms/posix/px4_layer/px4_posix_impl.cpp b/src/platforms/posix/px4_layer/px4_posix_impl.cpp index 2778efbeab..0d926f0520 100644 --- a/src/platforms/posix/px4_layer/px4_posix_impl.cpp +++ b/src/platforms/posix/px4_layer/px4_posix_impl.cpp @@ -46,7 +46,7 @@ #include #include #include "systemlib/param/param.h" -#include "hrt_work_lock.h" +#include "hrt_work.h" __BEGIN_DECLS