POSIX: Changed px4_poll to use hrt_work queue

QuRT's pthread_cancel implementation is lacking, and causes px4_poll to
always wait for the maximumn timeout. A cleaner implementation is provided
that uses the HRT work queue for posix targets.

In the future the posix code should be rtefactiored so that qurt (and other)
implementations that are duplicated, use the posix implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-29 19:08:06 -07:00
parent a1dd0bc758
commit da2ac877f8
3 changed files with 8 additions and 21 deletions
@@ -43,12 +43,9 @@ extern sem_t _hrt_work_lock;
extern struct wqueue_s g_hrt_work;
void hrt_work_queue_init(void);
int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t delay);
int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t usdelay);
void hrt_work_cancel(struct work_s *work);
//inline void hrt_work_lock(void);
//inline void hrt_work_unlock(void);
static inline void hrt_work_lock()
{
//PX4_INFO("hrt_work_lock");
@@ -43,7 +43,7 @@ extern sem_t _hrt_work_lock;
extern struct wqueue_s g_hrt_work;
void hrt_work_queue_init(void);
int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t delay);
int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t usdelay);
void hrt_work_cancel(struct work_s *work);
inline void hrt_work_lock(void);