From: David Goulet Date: Mon, 14 Nov 2011 17:08:29 +0000 (-0500) Subject: Add hashtable destroy X-Git-Tag: v2.0-pre15~121 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=038238aa959d8e8e8b7c465024ca37599fcc4056;p=lttng-tools.git Add hashtable destroy Signed-off-by: David Goulet --- diff --git a/lttng-sessiond/hashtable.c b/lttng-sessiond/hashtable.c index 6bca1dac0..956cfd426 100644 --- a/lttng-sessiond/hashtable.c +++ b/lttng-sessiond/hashtable.c @@ -106,3 +106,8 @@ unsigned long hashtable_get_count(struct cds_lfht *ht) return count; } + +int hashtable_destroy(struct cds_lfht *ht) +{ + return cds_lfht_destroy(ht, NULL); +} diff --git a/lttng-sessiond/hashtable.h b/lttng-sessiond/hashtable.h index 5174eed75..7212fb0e2 100644 --- a/lttng-sessiond/hashtable.h +++ b/lttng-sessiond/hashtable.h @@ -36,5 +36,6 @@ void hashtable_node_init(struct cds_lfht_node *node, int hashtable_del(struct cds_lfht *ht, struct cds_lfht_iter *iter); unsigned long hashtable_get_count(struct cds_lfht *ht); +int hashtable_destroy(struct cds_lfht *ht); #endif /* _LTT_HASHTABLE_H */