mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 14:33:34 +08:00
POSIX: code format changes
Changed the code format of the files derived from NuttX to match the code style of PX4. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -103,31 +103,31 @@
|
||||
|
||||
int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t delay)
|
||||
{
|
||||
struct wqueue_s *wqueue = &g_hrt_work;
|
||||
struct wqueue_s *wqueue = &g_hrt_work;
|
||||
|
||||
/* First, initialize the work structure */
|
||||
/* First, initialize the work structure */
|
||||
|
||||
work->worker = worker; /* Work callback */
|
||||
work->arg = arg; /* Callback argument */
|
||||
work->delay = delay; /* Delay until work performed */
|
||||
work->worker = worker; /* Work callback */
|
||||
work->arg = arg; /* Callback argument */
|
||||
work->delay = delay; /* Delay until work performed */
|
||||
|
||||
/* Now, time-tag that entry and put it in the work queue. This must be
|
||||
* done with interrupts disabled. This permits this function to be called
|
||||
* from with task logic or interrupt handlers.
|
||||
*/
|
||||
/* Now, time-tag that entry and put it in the work queue. This must be
|
||||
* done with interrupts disabled. This permits this function to be called
|
||||
* from with task logic or interrupt handlers.
|
||||
*/
|
||||
|
||||
hrt_work_lock();
|
||||
work->qtime = hrt_absolute_time(); /* Time work queued */
|
||||
//PX4_INFO("hrt work_queue adding work delay=%u time=%lu", delay, work->qtime);
|
||||
hrt_work_lock();
|
||||
work->qtime = hrt_absolute_time(); /* Time work queued */
|
||||
//PX4_INFO("hrt work_queue adding work delay=%u time=%lu", delay, work->qtime);
|
||||
|
||||
dq_addlast((dq_entry_t *)work, &wqueue->q);
|
||||
dq_addlast((dq_entry_t *)work, &wqueue->q);
|
||||
#ifdef __PX4_QURT
|
||||
px4_task_kill(wqueue->pid, SIGALRM); /* Wake up the worker thread */
|
||||
px4_task_kill(wqueue->pid, SIGALRM); /* Wake up the worker thread */
|
||||
#else
|
||||
px4_task_kill(wqueue->pid, SIGCONT); /* Wake up the worker thread */
|
||||
px4_task_kill(wqueue->pid, SIGCONT); /* Wake up the worker thread */
|
||||
#endif
|
||||
|
||||
hrt_work_unlock();
|
||||
return PX4_OK;
|
||||
hrt_work_unlock();
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user