Lines Matching refs:seqlock
47 struct seqlock { struct
51 typedef struct seqlock seqlock_t; argument
115 seqlock_init(struct seqlock *seqlock) in seqlock_init() argument
122 mtx_init(&seqlock->seql_lock, "seqlock", NULL, MTX_DEF|MTX_NOWITNESS); in seqlock_init()
123 seqcount_init(&seqlock->seql_count); in seqlock_init()
127 lkpi_write_seqlock(struct seqlock *seqlock, const bool irqsave) in lkpi_write_seqlock() argument
129 mtx_lock(&seqlock->seql_lock); in lkpi_write_seqlock()
132 write_seqcount_begin(&seqlock->seql_count); in lkpi_write_seqlock()
136 write_seqlock(struct seqlock *seqlock) in write_seqlock() argument
138 lkpi_write_seqlock(seqlock, false); in write_seqlock()
142 lkpi_write_sequnlock(struct seqlock *seqlock, const bool irqsave) in lkpi_write_sequnlock() argument
144 write_seqcount_end(&seqlock->seql_count); in lkpi_write_sequnlock()
147 mtx_unlock(&seqlock->seql_lock); in lkpi_write_sequnlock()
151 write_sequnlock(struct seqlock *seqlock) in write_sequnlock() argument
153 lkpi_write_sequnlock(seqlock, false); in write_sequnlock()
163 #define write_seqlock_irqsave(seqlock, flags) do { \ argument
165 lkpi_write_seqlock(seqlock, true); \
169 write_sequnlock_irqrestore(struct seqlock *seqlock, in write_sequnlock_irqrestore() argument
172 lkpi_write_sequnlock(seqlock, true); in write_sequnlock_irqrestore()
176 read_seqbegin(const struct seqlock *seqlock) in read_seqbegin() argument
178 return (read_seqcount_begin(&seqlock->seql_count)); in read_seqbegin()
181 #define read_seqretry(seqlock, gen) \ argument
182 read_seqcount_retry(&(seqlock)->seql_count, gen)