work: Convert usage of k_fifo to k_queue

Make use of k_queue directly since it has a more flexible API.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2017-07-03 19:09:44 +03:00 committed by Anas Nashif
commit adb581be8e
2 changed files with 6 additions and 6 deletions

View file

@ -1957,7 +1957,7 @@ typedef void (*k_work_handler_t)(struct k_work *work);
*/
struct k_work_q {
struct k_fifo fifo;
struct k_queue queue;
struct k_thread thread;
};
@ -1966,7 +1966,7 @@ enum {
};
struct k_work {
void *_reserved; /* Used by k_fifo implementation. */
void *_reserved; /* Used by k_queue implementation. */
k_work_handler_t handler;
atomic_t flags[1];
};
@ -2049,7 +2049,7 @@ static inline void k_work_submit_to_queue(struct k_work_q *work_q,
struct k_work *work)
{
if (!atomic_test_and_set_bit(work->flags, K_WORK_STATE_PENDING)) {
k_fifo_put(&work_q->fifo, work);
k_fifo_put(&work_q->queue, work);
}
}