Remove the sessiond "ready" counter mechanism
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 4 Dec 2018 16:50:30 +0000 (11:50 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 5 Dec 2018 20:16:21 +0000 (15:16 -0500)
commitc78d8e86e2f739490df42fc4c9d2de22234b6114
treed4c68d5fe8fde4e0e67eb9b1a25f08dfd060282e
parent3316b9d604bd4607e255ca3bbed0ee3e980dde4a
Remove the sessiond "ready" counter mechanism

This commit replaces the sessiond "ready" counter scheme with
the use of the lttng_thread util. The launch of the threads which
need to be active before the sessiond can signal its parents
(when launched in daemon mode) is now blocking. This means that
their associated "launch" functions wait until the threads mark
themselves as ready (through the use of a "ready" semaphore)
before returning and allowing the initialization of the sessiond
to continue.

The threads which expose externally-visible resources (UNIX and
TCP sockets) which must be fully initialized before marking the
session daemon as ready are:
  - Health thread,
  - Agent thread,
  - Client thread.

Previously, the "load session" thread was part of this group.
However, it is no longer necessary to perform the loading of
session configurations in a dedicated thread. The main thread
performs that operation itself. It is safe to do so since it
is performed after the launch of the client thread. The client
thread has to be fully initialized as the session loading code
"impersonates" a client to initialize the loaded sessions.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/Makefile.am
src/bin/lttng-sessiond/agent-thread.c
src/bin/lttng-sessiond/health.c
src/bin/lttng-sessiond/lttng-sessiond.h
src/bin/lttng-sessiond/ready.c [deleted file]
src/bin/lttng-sessiond/rotation-thread.c
tests/unit/Makefile.am
This page took 0.026916 seconds and 4 git commands to generate.