[lttng-dev] [RFC PATCH v2 03/13] Terminate dispatch thread after reg_apps_thread is terminated
Jérémie Galarneau
jeremie.galarneau at efficios.com
Thu Dec 14 01:55:26 UTC 2017
No objection to the code, but please add a description and comment.
Jérémie
On 18 September 2017 at 18:51, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
> src/bin/lttng-sessiond/main.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
> index 45c0270e..0ca72ec8 100644
> --- a/src/bin/lttng-sessiond/main.c
> +++ b/src/bin/lttng-sessiond/main.c
> @@ -497,9 +497,6 @@ static void stop_threads(void)
> ERR("write error on thread quit pipe");
> }
>
> - /* Dispatch thread */
> - CMM_STORE_SHARED(dispatch_thread_exit, 1);
> - futex_nto1_wake(&ust_cmd_queue.futex);
> }
>
> /*
> @@ -6306,6 +6303,10 @@ exit_client:
> retval = -1;
> }
> exit_reg_apps:
> + /* Instruct the dispatch thread to quit */
> + CMM_STORE_SHARED(dispatch_thread_exit, 1);
> + futex_nto1_wake(&ust_cmd_queue.futex);
> +
> ret = pthread_join(dispatch_thread, &status);
> if (ret) {
> errno = ret;
> --
> 2.11.0
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list