X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.hpp;fp=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.hpp;h=8a3150ae32d72987b5c46a20b9096188649e97a1;hp=4058de5a4d89953b41b4d947dcc4f9e230b9ce70;hb=32670d719327feb585374283a50eeb76ce36b962;hpb=75f62e5383c6ea1f62fb488a94f4a8f98400db71 diff --git a/src/bin/lttng-sessiond/notification-thread-commands.hpp b/src/bin/lttng-sessiond/notification-thread-commands.hpp index 4058de5a4..8a3150ae3 100644 --- a/src/bin/lttng-sessiond/notification-thread-commands.hpp +++ b/src/bin/lttng-sessiond/notification-thread-commands.hpp @@ -17,6 +17,8 @@ #include #include +#include + #include #include @@ -41,9 +43,9 @@ enum notification_thread_command_type { }; struct notification_thread_command { - struct cds_list_head cmd_list_node; + struct cds_list_head cmd_list_node = {}; - enum notification_thread_command_type type; + notification_thread_command_type type = NOTIFICATION_COMMAND_TYPE_QUIT; union { /* Register trigger. */ struct { @@ -108,7 +110,7 @@ struct notification_thread_command { const struct lttng_trigger *trigger; } get_trigger; - } parameters; + } parameters = {}; union { struct { @@ -117,11 +119,12 @@ struct notification_thread_command { struct { struct lttng_trigger *trigger; } get_trigger; - } reply; - /* lttng_waiter on which to wait for command reply (optional). */ - struct lttng_waiter reply_waiter; - enum lttng_error_code reply_code; - bool is_async; + } reply = {}; + + /* Used to wake origin thread for synchroneous commands. */ + nonstd::optional command_completed_waker = nonstd::nullopt; + lttng_error_code reply_code = LTTNG_ERR_UNK; + bool is_async = false; }; enum lttng_error_code