mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 16:50:35 +08:00
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:
@@ -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);
|
||||
Reference in New Issue
Block a user