mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
seqlock: Fix struct name and constants.
This commit fixed struct name and constant. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
5c5872dbac
commit
e5f46cb92b
@@ -93,7 +93,7 @@ uint32_t read_seqbegin(FAR const seqcount_t *s)
|
|||||||
uint32_t seq;
|
uint32_t seq;
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
seq = atomic_read_acquire((FAR atomic_t *)&s->sequence) & ~1;
|
seq = atomic_read_acquire((FAR atomic_t *)&s->sequence) & (~1u);
|
||||||
#else
|
#else
|
||||||
seq = s->sequence;
|
seq = s->sequence;
|
||||||
SMP_RMB();
|
SMP_RMB();
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ typedef union rspinlock_u
|
|||||||
|
|
||||||
#define SEQLOCK_INITIALIZER { 0u }
|
#define SEQLOCK_INITIALIZER { 0u }
|
||||||
|
|
||||||
typedef struct seqclock
|
typedef struct seqcount_s
|
||||||
{
|
{
|
||||||
uint32_t sequence;
|
uint32_t sequence;
|
||||||
} seqcount_t;
|
} seqcount_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user