diff options
author | Niels de Vos <ndevos@redhat.com> | 2017-04-06 15:11:00 +0200 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-04-10 11:18:02 -0400 |
commit | 3594f960a8b5ccf81b6d06c89003f175ddd6a2c8 (patch) | |
tree | 1a70d042dd1d202e4eebd71f87b0b11933f65f57 /autogen.sh | |
parent | ec0e1176d476ef5765efe7713ce6a57f2f081722 (diff) |
io-stats: use gf_atomic_t instead of partial atomic variables
io-stats should not use the legacy __sync_*() builtin functions for
doing atomic operations. Instead, it should use the gf_atomic_t type and
macros for any of the statistics it calculates. This makes sure that the
behaviour is the same on all architectures.
Also the __sync_*() builtins are being deprecated with __atomic_*()
functions. The "atomic.h" header will be one of the very few places
where these builtin functions are used and the feature checking will be
needed.
While replacing many of the uint64_t types, it seemed that locking
around some of the statements is not needed anymore (done automatically
with the GF_ATOMIC_*() macros). This resulted in quite some removal and
cleanup of those BUMP_*() macros. It seemed appropriate to make these
macros normal functions and let the compiler decide on inlining them.
This caused some existing functions to be shuffled around.
Change-Id: I7c4f3df1832eae51debda2b127b943e14546b605
URL: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
BUG: 1437037
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17009
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'autogen.sh')
0 files changed, 0 insertions, 0 deletions