int ret;
enum lttng_condition_status condition_status;
enum lttng_notification_channel_status nc_status;
+ const uint64_t eventfd_increment_value = 1;
struct lttng_condition *rotate_condition = nullptr;
struct lttng_action *notify_action = nullptr;
const struct lttng_credentials session_creds = {
goto end;
}
+ ret = lttng_write(rotate_notification_channel_subscription_change_eventfd,
+ &eventfd_increment_value,
+ sizeof(eventfd_increment_value));
+ if (ret != sizeof(eventfd_increment_value)) {
+ PERROR("Failed to wake up rotation thread as writing to the rotation thread notification channel subscription change eventfd failed");
+ ret = -1;
+ goto end;
+ }
+
ret = notification_thread_command_register_trigger(
notification_thread_handle, session->rotate_trigger, true);
if (ret < 0 && ret != -LTTNG_ERR_TRIGGER_EXISTS) {
{
int ret = 0;
enum lttng_notification_channel_status status;
+ const uint64_t eventfd_increment_value = 1;
LTTNG_ASSERT(session->rotate_trigger);
status = lttng_notification_channel_unsubscribe(
goto end;
}
+ ret = lttng_write(rotate_notification_channel_subscription_change_eventfd,
+ &eventfd_increment_value,
+ sizeof(eventfd_increment_value));
+ if (ret != sizeof(eventfd_increment_value)) {
+ PERROR("Failed to wake up rotation thread as writing to the rotation thread notification channel subscription change eventfd failed");
+ ret = -1;
+ goto end;
+ }
+
ret = notification_thread_command_unregister_trigger(notification_thread_handle,
session->rotate_trigger);
if (ret != LTTNG_OK) {