X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fhashtable%2Fhashtable.c;h=07210fa8161e63e41a6ea12c061812b27c94d1c8;hp=8c26ebe15b63d3a71f2efd40398e2781e5ddbb59;hb=efa116c6f19ecdc344a82709e7d919703ec96c45;hpb=1ac1098fc560b8b93adb17892c89915c863121fd diff --git a/src/common/hashtable/hashtable.c b/src/common/hashtable/hashtable.c index 8c26ebe15..07210fa81 100644 --- a/src/common/hashtable/hashtable.c +++ b/src/common/hashtable/hashtable.c @@ -220,6 +220,20 @@ void lttng_ht_add_unique_str(struct lttng_ht *ht, assert(node_ptr == &node->node); } +/* + * Add string node to hashtable. + */ +void lttng_ht_add_str(struct lttng_ht *ht, + struct lttng_ht_node_str *node) +{ + assert(ht); + assert(ht->ht); + assert(node); + + cds_lfht_add(ht->ht, ht->hash_fct(node->key, lttng_ht_seed), + &node->node); +} + /* * Add unsigned long node to hashtable. */