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:16:08 +0000 (15:16 -0400)
commit70a71a41549999e60f879cc030726a154925fd16
tree4f0e1522dd13c35a0a79784c61895ed846f3b662
parentf8fc08d258be3b82ddce66af0c39f9222656ff42
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.027344 seconds and 4 git commands to generate.