seqlock
seqlock_init(struct seqlock *seqlock)
mtx_init(&seqlock->seql_lock, "seqlock", NULL, MTX_DEF|MTX_NOWITNESS);
seqcount_init(&seqlock->seql_count);
lkpi_write_seqlock(struct seqlock *seqlock, const bool irqsave)
mtx_lock(&seqlock->seql_lock);
write_seqcount_begin(&seqlock->seql_count);
write_seqlock(struct seqlock *seqlock)
lkpi_write_seqlock(seqlock, false);
lkpi_write_sequnlock(struct seqlock *seqlock, const bool irqsave)
write_seqcount_end(&seqlock->seql_count);
mtx_unlock(&seqlock->seql_lock);
write_sequnlock(struct seqlock *seqlock)
lkpi_write_sequnlock(seqlock, false);
#define write_seqlock_irqsave(seqlock, flags) do { \
lkpi_write_seqlock(seqlock, true); \
write_sequnlock_irqrestore(struct seqlock *seqlock,
lkpi_write_sequnlock(seqlock, true);
read_seqbegin(const struct seqlock *seqlock)
return (read_seqcount_begin(&seqlock->seql_count));
#define read_seqretry(seqlock, gen) \
read_seqcount_retry(&(seqlock)->seql_count, gen)
typedef struct seqlock seqlock_t;