Skip to content

Commit

Permalink
POSIX: hrt_work_lock.h to hrt_work.h
Browse files Browse the repository at this point in the history
The header file now contains all hrt workqueue related prototypes.

Signed-off-by: Mark Charlebois <[email protected]>
  • Loading branch information
mcharleb committed Jun 2, 2015
1 parent 6fd612a commit af45954
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/platforms/posix/px4_layer/drv_hrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <semaphore.h>
#include <time.h>
#include <string.h>
#include "hrt_work_lock.h"
#include "hrt_work.h"

static struct sq_queue_s callout_queue;

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/posix/px4_layer/hrt_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include <semaphore.h>
#include <drivers/drv_hrt.h>
#include <px4_workqueue.h>
#include "hrt_work_lock.h"
#include "hrt_work.h"

#ifdef CONFIG_SCHED_WORKQUEUE

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/posix/px4_layer/hrt_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <queue.h>
#include <px4_workqueue.h>
#include <drivers/drv_hrt.h>
#include "hrt_work_lock.h"
#include "hrt_work.h"

/****************************************************************************
* Pre-processor Definitions
Expand Down
16 changes: 5 additions & 11 deletions src/platforms/posix/px4_layer/hrt_work_cancel.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <px4_defines.h>
#include <queue.h>
#include <px4_workqueue.h>
#include "hrt_work_lock.h"
#include "hrt_work.h"

/****************************************************************************
* Pre-processor Definitions
Expand All @@ -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);

Expand All @@ -113,5 +108,4 @@ int hrt_work_cancel(struct work_s *work)
}

hrt_work_unlock();
return PX4_OK;
}
2 changes: 1 addition & 1 deletion src/platforms/posix/px4_layer/px4_posix_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <errno.h>
#include <unistd.h>
#include "systemlib/param/param.h"
#include "hrt_work_lock.h"
#include "hrt_work.h"

__BEGIN_DECLS

Expand Down

0 comments on commit af45954

Please sign in to comment.