X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;fp=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=8d69ef7c45919448d227056ad82880e21a476e48;hp=3686d72f7015e9b728eb2d6ab246a1e5a4d14f9a;hb=f620cc284daf7e87d17da0faf9e3652e60c8fb05;hpb=a0b34569a7cfe37b2112b3d77920aa64e1e8f9f3 diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index 3686d72f7..8d69ef7c4 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -530,15 +530,15 @@ void *thread_notification(void *data) DBG("[notification-thread] Started notification thread"); + health_register(health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION); + rcu_register_thread(); + rcu_thread_online(); + if (!handle) { ERR("[notification-thread] Invalid thread context provided"); goto end; } - rcu_register_thread(); - rcu_thread_online(); - - health_register(health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION); health_code_update(); ret = init_thread_state(handle, &state); @@ -642,10 +642,10 @@ void *thread_notification(void *data) exit: error: fini_thread_state(&state); - health_unregister(health_sessiond); +end: rcu_thread_offline(); rcu_unregister_thread(); -end: + health_unregister(health_sessiond); return NULL; }