diff --git a/include/nuttx/seqlock.h b/include/nuttx/seqlock.h index 53498003767..da937d780b6 100644 --- a/include/nuttx/seqlock.h +++ b/include/nuttx/seqlock.h @@ -66,10 +66,9 @@ extern "C" 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; +#ifdef CONFIG_SMP + SMP_WMB(); #endif }