X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=37f6442156ff03a8724ef62137e66b1548544f30;hp=ee3b3406da781b1d488d17af5218933d2eefd265;hb=0b2dc8df2a6d7b3341a72a04767dd6328907c97c;hpb=4950b860f76b938833046793e7221c11e8e89682 diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index ee3b3406d..37f644215 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -38,6 +38,7 @@ #include "ust-app.h" #include "ust-consumer.h" #include "ust-ctl.h" +#include "utils.h" /* Next available channel key. */ static unsigned long next_channel_key; @@ -307,9 +308,9 @@ void delete_ust_app_stream(int sock, struct ust_app_stream *stream) /* * We need to execute ht_destroy outside of RCU read-side critical - * section, so we postpone its execution using call_rcu. It is simpler - * than to change the semantic of the many callers of - * delete_ust_app_channel(). + * section and outside of call_rcu thread, so we postpone its execution + * using ht_cleanup_push. It is simpler than to change the semantic of + * the many callers of delete_ust_app_session(). */ static void delete_ust_app_channel_rcu(struct rcu_head *head) @@ -317,8 +318,8 @@ void delete_ust_app_channel_rcu(struct rcu_head *head) struct ust_app_channel *ua_chan = caa_container_of(head, struct ust_app_channel, rcu_head); - lttng_ht_destroy(ua_chan->ctx); - lttng_ht_destroy(ua_chan->events); + ht_cleanup_push(ua_chan->ctx); + ht_cleanup_push(ua_chan->events); free(ua_chan); } @@ -583,9 +584,9 @@ end: /* * We need to execute ht_destroy outside of RCU read-side critical - * section, so we postpone its execution using call_rcu. It is simpler - * than to change the semantic of the many callers of - * delete_ust_app_session(). + * section and outside of call_rcu thread, so we postpone its execution + * using ht_cleanup_push. It is simpler than to change the semantic of + * the many callers of delete_ust_app_session(). */ static void delete_ust_app_session_rcu(struct rcu_head *head) @@ -593,7 +594,7 @@ void delete_ust_app_session_rcu(struct rcu_head *head) struct ust_app_session *ua_sess = caa_container_of(head, struct ust_app_session, rcu_head); - lttng_ht_destroy(ua_sess->channels); + ht_cleanup_push(ua_sess->channels); free(ua_sess); } @@ -685,8 +686,8 @@ void delete_ust_app(struct ust_app *app) rcu_read_unlock(); } - lttng_ht_destroy(app->sessions); - lttng_ht_destroy(app->ust_objd); + ht_cleanup_push(app->sessions); + ht_cleanup_push(app->ust_objd); /* * Wait until we have deleted the application from the sock hash table @@ -3155,9 +3156,9 @@ void ust_app_clean_list(void) rcu_read_unlock(); /* Destroy is done only when the ht is empty */ - lttng_ht_destroy(ust_app_ht); - lttng_ht_destroy(ust_app_ht_by_sock); - lttng_ht_destroy(ust_app_ht_by_notify_sock); + ht_cleanup_push(ust_app_ht); + ht_cleanup_push(ust_app_ht_by_sock); + ht_cleanup_push(ust_app_ht_by_notify_sock); } /*