Skip to content

Commit ea6cccf

Browse files
flitChristopher Friedt
authored andcommitted
kernel: work_q: use flags_get() in work_delayable_busy_get_locked().
The k_work::flags field is not an atomic_t and would cause -Wpointer-sign warning on some compilers. This function was the only one in work.c to use atomic_get() so there is no benefit to atomicity. Signed-off-by: Chris Reed <chris.reed@arm.com>
1 parent 0720a79 commit ea6cccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/work.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ void k_work_init_delayable(struct k_work_delayable *dwork,
829829

830830
static inline int work_delayable_busy_get_locked(const struct k_work_delayable *dwork)
831831
{
832-
return atomic_get(&dwork->work.flags) & K_WORK_MASK;
832+
return flags_get(&dwork->work.flags) & K_WORK_MASK;
833833
}
834834

835835
int k_work_delayable_busy_get(const struct k_work_delayable *dwork)

0 commit comments

Comments
 (0)