]> git.ipfire.org Git - thirdparty/glibc.git/blob - bits/atomic_wide_counter.h
INSTALL, install.texi: minor updates, regenerate
[thirdparty/glibc.git] / bits / atomic_wide_counter.h
1 /* Monotonically increasing wide counters (at least 62 bits).
2 Copyright (C) 2016-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _BITS_ATOMIC_WIDE_COUNTER_H
20 #define _BITS_ATOMIC_WIDE_COUNTER_H
21
22 /* Counter that is monotonically increasing (by less than 2**31 per
23 increment), with a single writer, and an arbitrary number of
24 readers. */
25 typedef union
26 {
27 __extension__ unsigned long long int __value64;
28 struct
29 {
30 unsigned int __low;
31 unsigned int __high;
32 } __value32;
33 } __atomic_wide_counter;
34
35 #endif /* _BITS_ATOMIC_WIDE_COUNTER_H */