X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fhashtable%2Fhashtable.cpp;h=3aa3d79d42210dcfb192a21056c1a1a2319c7716;hb=0114db0ec2407029052eb61a0189c9b1cd64d520;hp=1b40f91f125fa97ef46d409476148d1ef29585dd;hpb=3691d312bcf4dc2cc15f0ecb1f0e2fd2f34315b8;p=lttng-tools.git diff --git a/src/common/hashtable/hashtable.cpp b/src/common/hashtable/hashtable.cpp index 1b40f91f1..3aa3d79d4 100644 --- a/src/common/hashtable/hashtable.cpp +++ b/src/common/hashtable/hashtable.cpp @@ -36,7 +36,7 @@ static unsigned long max_hash_buckets_size = 0; static int match_str(struct cds_lfht_node *node, const void *key) { struct lttng_ht_node_str *match_node = - caa_container_of(node, struct lttng_ht_node_str, node); + lttng::utils::container_of(node, <tng_ht_node_str::node); return hash_match_key_str(match_node->key, (void *) key); } @@ -47,7 +47,7 @@ static int match_str(struct cds_lfht_node *node, const void *key) static int match_ulong(struct cds_lfht_node *node, const void *key) { struct lttng_ht_node_ulong *match_node = - caa_container_of(node, struct lttng_ht_node_ulong, node); + lttng::utils::container_of(node, <tng_ht_node_ulong::node); return hash_match_key_ulong((void *) match_node->key, (void *) key); } @@ -58,7 +58,7 @@ static int match_ulong(struct cds_lfht_node *node, const void *key) static int match_u64(struct cds_lfht_node *node, const void *key) { struct lttng_ht_node_u64 *match_node = - caa_container_of(node, struct lttng_ht_node_u64, node); + lttng::utils::container_of(node, <tng_ht_node_u64::node); return hash_match_key_u64(&match_node->key, (void *) key); } @@ -69,7 +69,7 @@ static int match_u64(struct cds_lfht_node *node, const void *key) static int match_two_u64(struct cds_lfht_node *node, const void *key) { struct lttng_ht_node_two_u64 *match_node = - caa_container_of(node, struct lttng_ht_node_two_u64, node); + lttng::utils::container_of(node, <tng_ht_node_two_u64::node); return hash_match_key_two_u64((void *) &match_node->key, (void *) key); } @@ -413,7 +413,7 @@ struct lttng_ht_node_ulong *lttng_ht_add_replace_ulong(struct lttng_ht *ht, if (!node_ptr) { return NULL; } else { - return caa_container_of(node_ptr, struct lttng_ht_node_ulong, node); + return lttng::utils::container_of(node_ptr, <tng_ht_node_ulong::node); } LTTNG_ASSERT(node_ptr == &node->node); } @@ -438,7 +438,7 @@ struct lttng_ht_node_u64 *lttng_ht_add_replace_u64(struct lttng_ht *ht, if (!node_ptr) { return NULL; } else { - return caa_container_of(node_ptr, struct lttng_ht_node_u64, node); + return lttng::utils::container_of(node_ptr, <tng_ht_node_u64::node); } LTTNG_ASSERT(node_ptr == &node->node); } @@ -517,7 +517,7 @@ struct lttng_ht_node_str *lttng_ht_iter_get_node_str( if (!node) { return NULL; } - return caa_container_of(node, struct lttng_ht_node_str, node); + return lttng::utils::container_of(node, <tng_ht_node_str::node); } /* @@ -533,7 +533,7 @@ struct lttng_ht_node_ulong *lttng_ht_iter_get_node_ulong( if (!node) { return NULL; } - return caa_container_of(node, struct lttng_ht_node_ulong, node); + return lttng::utils::container_of(node, <tng_ht_node_ulong::node); } /* @@ -549,7 +549,7 @@ struct lttng_ht_node_u64 *lttng_ht_iter_get_node_u64( if (!node) { return NULL; } - return caa_container_of(node, struct lttng_ht_node_u64, node); + return lttng::utils::container_of(node, <tng_ht_node_u64::node); } /* @@ -565,5 +565,5 @@ struct lttng_ht_node_two_u64 *lttng_ht_iter_get_node_two_u64( if (!node) { return NULL; } - return caa_container_of(node, struct lttng_ht_node_two_u64, node); + return lttng::utils::container_of(node, <tng_ht_node_two_u64::node); }