Clean-up: explicit mb before decrementing lttng_sessiond_ready
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 May 2018 19:03:13 +0000 (15:03 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 May 2018 19:07:51 +0000 (15:07 -0400)
commit524423d6b372147fd0a012700873d455fa4a0737
tree0f01bc06c30757a18605329b076ce6fb6f173082
parentbc4b3ff16b26d5430fe701fd0680a157c65e21f8
Clean-up: explicit mb before decrementing lttng_sessiond_ready

This is mostly a documentation fix as there are no thread-safety
implications to this change. uatomic_sub_return() was used since it
performs a full memory barrier before and after the atomic operation
(as per the urcu documentation).

The barrier performed after the substraction is not needed in this
particular case. Moreover, using an explicit cmm_smp_mb() statement
makes the code clearer; see the comment as to why this barrier is
needed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.026239 seconds and 4 git commands to generate.