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:10:51 +0000 (15:10 -0400)
commit8b0d46366f5c87043d22aa29b9f26e5249bf7c3a
tree7de84c0f7a84982e8750c7765915496a36402964
parent524423d6b372147fd0a012700873d455fa4a0737
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.033384 seconds and 4 git commands to generate.