Fix: perform the initialization memory barrier out of loop body
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 May 2018 19:08:14 +0000 (15:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 May 2018 19:15:56 +0000 (15:15 -0400)
commit37317960b40f5c473cff5d6dfad1f667e0109ff1
treed6328c0877ab6d7c5e11a9accf7bae746951444c
parentc9d85d295b71b29506d1de4a675e701a51599472
Fix: perform the initialization memory barrier out of loop body

The memory barrier used by the client thread should be performed
after the lttng_sessiond_ready counter has been seen to have
reached zero.

This ensures that loads are not speculatively performed before
this point as the thread will interact with data structures
initialized by the support threads for which it was waiting for
the initialization to complete.

See the comment as to why this read barrier is promoted to a
full barrier.

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