X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=e0937d8e58eb577d2f088968d7a16299fe5db4c8;hp=059e620598b68b2a84e731980d836f14bd7d1002;hb=8ada111f6d3ab40d1c33cf1a7b2546de9a47d1d5;hpb=287a512f2b868c16132b894a8143a5faf0379ca8 diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index 059e62059..e0937d8e5 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -158,7 +157,6 @@ void notification_thread_handle_destroy( struct notification_thread_handle *handle) { int ret; - struct notification_thread_command *cmd, *tmp; if (!handle) { goto end; @@ -172,15 +170,7 @@ void notification_thread_handle_destroy( PERROR("close notification command queue event_fd"); } - pthread_mutex_lock(&handle->cmd_queue.lock); - /* Purge queue of in-flight commands and mark them as cancelled. */ - cds_list_for_each_entry_safe(cmd, tmp, &handle->cmd_queue.list, - cmd_list_node) { - cds_list_del(&cmd->cmd_list_node); - cmd->reply_code = LTTNG_ERR_COMMAND_CANCELLED; - futex_nto1_wake(&cmd->reply_futex); - } - pthread_mutex_unlock(&handle->cmd_queue.lock); + assert(cds_list_empty(&handle->cmd_queue.list)); pthread_mutex_destroy(&handle->cmd_queue.lock); if (handle->channel_monitoring_pipes.ust32_consumer >= 0) {