X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Faction-executor.c;h=2a0aab45c962db46f9e9f499a7bdaca3420bd98a;hp=5459c4b5e4876ef75f45f65e6c6c7344eef020e6;hb=ce0b1d61919f37517a6212f7af2afe0fa1b1dcb0;hpb=c203f0585aa3a3b1c2b1994899b8277ed79dad2d diff --git a/src/bin/lttng-sessiond/action-executor.c b/src/bin/lttng-sessiond/action-executor.c index 5459c4b5e..2a0aab45c 100644 --- a/src/bin/lttng-sessiond/action-executor.c +++ b/src/bin/lttng-sessiond/action-executor.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -600,8 +601,10 @@ static bool shutdown_action_executor_thread(void *_data) { struct action_executor *executor = _data; + pthread_mutex_lock(&executor->work.lock); executor->should_quit = true; pthread_cond_signal(&executor->work.cond); + pthread_mutex_unlock(&executor->work.lock); return true; } @@ -725,10 +728,10 @@ enum action_executor_status action_executor_enqueue( signal = true; error_unlock: - pthread_mutex_unlock(&executor->work.lock); if (signal) { pthread_cond_signal(&executor->work.cond); } + pthread_mutex_unlock(&executor->work.lock); lttng_evaluation_destroy(evaluation); return executor_status;