This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 2d88bfdba65af53001e69efd3e27f92cca5b3f90 Author: hujun5 <[email protected]> AuthorDate: Tue Nov 4 17:23:03 2025 +0800 seqlock: Move the header files to decouple compilation dependencies. seqlock: Move the header files to decouple compilation dependencies. Assisted-By: mimo-v2.6-pro Co-authored-by: ouyangxiangzhen <[email protected]> Signed-off-by: hujun5 <[email protected]> Signed-off-by: ouyangxiangzhen <[email protected]> --- include/nuttx/spinlock_type.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/nuttx/spinlock_type.h b/include/nuttx/spinlock_type.h index 9a920ba20d9..334d7d7eae9 100644 --- a/include/nuttx/spinlock_type.h +++ b/include/nuttx/spinlock_type.h @@ -123,9 +123,13 @@ typedef struct rspinlock_s #define SEQLOCK_INITIALIZER { 0u } -typedef struct seqcount_s +typedef struct seqclock { - uint32_t sequence; +#ifdef CONFIG_SMP + atomic_t sequence; +#else + volatile uint32_t sequence; +#endif } seqcount_t; #if defined(__cplusplus)
