sessiond: notification: add support for async commands
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Feb 2020 21:50:52 +0000 (16:50 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 Aug 2020 21:05:27 +0000 (17:05 -0400)
commit0ab399e0bcf4e99492845f02e3e5b405155dea92
tree9d031d4f44571bc016736118f92f9bef6c9c2b4d
parentdd877ea65a8db6b9abcffec9162695059ced90f7
sessiond: notification: add support for async commands

Notification thread commands are currently all blocking. This means
that the emitter of the command uses the notification_thread_command
APIs to (stack) allocate a command context and wait on an lttng_waiter
for a reply.

In preparation for the addition of non-blocking commands, a new type
of asynchroneous commands is introduced. Asynchroneous commands are
"fire-and-forget"; the caller has no way of obtaining the result of
the command.

Asynchroneous command contexts are heap-allocated and their ownership
is transferred to the notification thread. The notification thread
will not attempt to wake-up the emitter and will free() the command
context regardless of the command's result.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I6951987dda0262d1500a3b4e1403fb2559a3ff44
src/bin/lttng-sessiond/notification-thread-commands.c
src/bin/lttng-sessiond/notification-thread-commands.h
src/bin/lttng-sessiond/notification-thread-events.c
This page took 0.026016 seconds and 4 git commands to generate.