Lines Matching refs:seqcount

41 struct seqcount {  struct
45 typedef struct seqcount seqcount_t; argument
48 seqcount_init(struct seqcount *seqcount) in seqcount_init() argument
51 seqcount->sqc_gen = 0; in seqcount_init()
55 seqcount_destroy(struct seqcount *seqcount) in seqcount_destroy() argument
58 KASSERT((seqcount->sqc_gen & 1) == 0); in seqcount_destroy()
59 seqcount->sqc_gen = -1; in seqcount_destroy()
63 write_seqcount_begin(struct seqcount *seqcount) in write_seqcount_begin() argument
66 KASSERT((seqcount->sqc_gen & 1) == 0); in write_seqcount_begin()
67 seqcount->sqc_gen |= 1; in write_seqcount_begin()
72 write_seqcount_end(struct seqcount *seqcount) in write_seqcount_end() argument
75 KASSERT((seqcount->sqc_gen & 1) == 1); in write_seqcount_end()
77 seqcount->sqc_gen |= 1; /* paranoia */ in write_seqcount_end()
78 seqcount->sqc_gen++; in write_seqcount_end()
82 __read_seqcount_begin(const struct seqcount *seqcount) in __read_seqcount_begin() argument
86 while (__predict_false((gen = seqcount->sqc_gen) & 1)) in __read_seqcount_begin()
94 __read_seqcount_retry(const struct seqcount *seqcount, unsigned gen) in __read_seqcount_retry() argument
98 return __predict_false(seqcount->sqc_gen != gen); in __read_seqcount_retry()
102 read_seqcount_begin(const struct seqcount *seqcount) in read_seqcount_begin() argument
106 gen = __read_seqcount_begin(seqcount); in read_seqcount_begin()
113 read_seqcount_retry(const struct seqcount *seqcount, unsigned gen) in read_seqcount_retry() argument
117 return __read_seqcount_retry(seqcount, gen); in read_seqcount_retry()
121 raw_read_seqcount(const struct seqcount *seqcount) in raw_read_seqcount() argument
125 gen = seqcount->sqc_gen; in raw_read_seqcount()
133 struct seqcount sql_count;