From 9c7b5eacea2cdc24e7c9b879493ab5f0384d87f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Tue, 4 Oct 2016 18:11:05 -0300 Subject: [PATCH] unified: Fix building of the unified kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6824cdb9123a574a56af10efdebdc1c8b82427f8 Signed-off-by: Iván Briano --- include/kernel.h | 4 ++-- kernel/unified/work_q.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kernel.h b/include/kernel.h index 86b60ed4b11..8724192cce6 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -479,7 +479,7 @@ struct k_work_q { * @brief Work flags. */ enum { - NANO_WORK_STATE_PENDING, /* Work item pending state */ + K_WORK_STATE_PENDING, /* Work item pending state */ }; /** @@ -538,7 +538,7 @@ static inline void k_work_submit_to_queue(struct k_work_q *work_q, */ static inline int k_work_pending(struct k_work *work) { - return atomic_test_bit(work->flags, NANO_WORK_STATE_PENDING); + return atomic_test_bit(work->flags, K_WORK_STATE_PENDING); } /** diff --git a/kernel/unified/work_q.c b/kernel/unified/work_q.c index e4ee3a812f0..b596da188f8 100644 --- a/kernel/unified/work_q.c +++ b/kernel/unified/work_q.c @@ -40,7 +40,7 @@ static void work_q_main(void *work_q_ptr, void *p2, void *p3) handler = work->handler; /* Reset pending state so it can be resubmitted by handler */ - if (atomic_test_and_reset_bit(work->flags, + if (atomic_test_and_clear_bit(work->flags, K_WORK_STATE_PENDING)) { handler(work); }