Hi Mathieu,
While OK for the general case, I would recommend that we immediately implement something more efficient on x86 32/64 which takes into account that __ATOMIC_ACQ_REL atomic operations are implemented with LOCK prefixed atomic ops, which imply the barrier already, leaving the before/after_uatomic_*() as no-ops.
maybe first check whether the GCC optimizers merge them. I believe some optimizations of atomic primitives are allowed and implemented, but I couldn't say which ones.
Best wishes, Duncan. _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev