Skip to content

Commit fdc7a2b

Browse files
hujun260zyfeier
authored andcommitted
sched/tcb: change the type of tcb->flags to atomic_t
The previous commit changed every access to tcb->flags to use the atomic_* API but left the field itself as uint32_t, which the aarch64 clang build rejects ("address argument to atomic operation must be a pointer to _Atomic type"). Give the field the atomic_t type those operations require. Signed-off-by: hujun5 <hujun5@xiaomi.com> Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
1 parent efb43a8 commit fdc7a2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/nuttx/sched.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ struct tcb_s
664664
uint8_t cpu; /* CPU index if running/assigned */
665665
cpu_set_t affinity; /* Bit set of permitted CPUs */
666666
#endif
667-
uint32_t flags; /* Misc. general status flags */
667+
atomic_t flags; /* Misc. general status flags */
668668
int16_t lockcount; /* 0=preemptible (not-locked) */
669669
#ifdef CONFIG_IRQCOUNT
670670
int16_t irqcount; /* 0=Not in critical section */

0 commit comments

Comments
 (0)