[Bugs] [Bug 1437037] Standardize atomic increment/decrement calling conventions

bugzilla at redhat.com bugzilla at redhat.com
Mon Apr 10 15:18:10 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1437037



--- Comment #12 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/17009 committed in master by Jeff Darcy
(jeff at pl.atyp.us) 
------
commit 3594f960a8b5ccf81b6d06c89003f175ddd6a2c8
Author: Niels de Vos <ndevos at redhat.com>
Date:   Thu Apr 6 15:11:00 2017 +0200

    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 at redhat.com>
    Reviewed-on: https://review.gluster.org/17009
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Amar Tumballi <amarts at redhat.com>
    Reviewed-by: Jeff Darcy <jeff at pl.atyp.us>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=GbTsd9MQHG&a=cc_unsubscribe


More information about the Bugs mailing list