mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
seqlock: add SMP_WMB to seqlock
This commit added SMP_WMB to seqlock. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -161,6 +161,7 @@ irqstate_t write_seqlock_irqsave(FAR seqcount_t *s)
|
||||
irqstate_t flags = spin_lock_irqsave(&s->lock);
|
||||
|
||||
s->sequence++;
|
||||
SMP_WMB();
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -183,6 +184,7 @@ irqstate_t write_seqlock_irqsave(FAR seqcount_t *s)
|
||||
static inline_function
|
||||
void write_sequnlock_irqrestore(seqcount_t *s, irqstate_t flags)
|
||||
{
|
||||
SMP_WMB();
|
||||
s->sequence++;
|
||||
spin_unlock_irqrestore(&s->lock, flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user