Lines Matching +full:non +full:- +full:exclusive
1 /* SPDX-License-Identifier: GPL-2.0 */
6 * Protect against 64-bit values tearing on 32-bit architectures. This is
11 * - Use a seqcount on 32-bit
12 * - The whole thing is a no-op on 64-bit architectures.
36 * an exclusive access to counters (a lock is already taken, or per cpu
37 * data is used [in a non preemptable context])
39 * spin_lock_bh(...) or other synchronization to get exclusive access
41 * u64_stats_update_begin(&stats->syncp);
42 * u64_stats_add(&stats->bytes64, len); // non atomic operation
43 * u64_stats_inc(&stats->packets64); // non atomic operation
44 * u64_stats_update_end(&stats->syncp);
53 * start = u64_stats_fetch_begin(&stats->syncp);
54 * tbytes = u64_stats_read(&stats->bytes64); // non atomic operation
55 * tpackets = u64_stats_read(&stats->packets64); // non atomic operation
56 * } while (u64_stats_fetch_retry(&stats->syncp, start));
79 return local64_read(&p->v); in u64_stats_read()
84 local64_set(&p->v, val); in u64_stats_set()
89 local64_add(val, &p->v); in u64_stats_add()
94 local64_inc(&p->v); in u64_stats_inc()
120 return p->v; in u64_stats_read()
125 p->v = val; in u64_stats_set()
130 p->v += val; in u64_stats_add()
135 p->v++; in u64_stats_inc()
141 seqcount_init(&__s->seq); \
147 write_seqcount_begin(&syncp->seq); in __u64_stats_update_begin()
152 write_seqcount_end(&syncp->seq); in __u64_stats_update_end()
171 return read_seqcount_begin(&syncp->seq); in __u64_stats_fetch_begin()
177 return read_seqcount_retry(&syncp->seq, start); in __u64_stats_fetch_retry()