mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
seqlock: Remove atomic_init to fix compilation error.
Since the adafruit-kb2040:smp do not support the `atomic_init`, we have to remove the function. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
23e985b5ba
commit
5c5872dbac
@@ -66,10 +66,9 @@ extern "C"
|
|||||||
|
|
||||||
static inline_function void seqlock_init(FAR seqcount_t *s)
|
static inline_function void seqlock_init(FAR seqcount_t *s)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
atomic_init((FAR atomic_t *)&s->sequence, 0u);
|
|
||||||
#else
|
|
||||||
s->sequence = 0u;
|
s->sequence = 0u;
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
SMP_WMB();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user