From: Mathieu Desnoyers Date: Thu, 15 Feb 2024 22:29:22 +0000 (-0500) Subject: Fix: change order of _cds_lfht_new_with_alloc parameters X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8c5aef691745bc06750886e10bfda84f2b749ed8;p=userspace-rcu.git Fix: change order of _cds_lfht_new_with_alloc parameters The "flavor" parameter should come before the "alloc" parameter to match the order of cds_lfht_new_with_flavor_alloc() parameters. Signed-off-by: Mathieu Desnoyers Change-Id: Ia704a0fd9cb90af966464e25e6202fed1a952eed --- diff --git a/include/urcu/rculfhash.h b/include/urcu/rculfhash.h index 8b57cd8..e0f4b35 100644 --- a/include/urcu/rculfhash.h +++ b/include/urcu/rculfhash.h @@ -159,8 +159,8 @@ struct cds_lfht *_cds_lfht_new_with_alloc(unsigned long init_size, unsigned long max_nr_buckets, int flags, const struct cds_lfht_mm_type *mm, - const struct cds_lfht_alloc *alloc, const struct rcu_flavor_struct *flavor, + const struct cds_lfht_alloc *alloc, pthread_attr_t *attr); /* @@ -248,7 +248,7 @@ struct cds_lfht *cds_lfht_new_with_flavor_alloc(unsigned long init_size, pthread_attr_t *attr) { return _cds_lfht_new_with_alloc(init_size, min_nr_alloc_buckets, max_nr_buckets, - flags, NULL, alloc, flavor, attr); + flags, NULL, flavor, alloc, attr); } diff --git a/src/rculfhash.c b/src/rculfhash.c index 8d7c1e6..10f5b8e 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -1646,8 +1646,8 @@ struct cds_lfht *_cds_lfht_new_with_alloc(unsigned long init_size, unsigned long max_nr_buckets, int flags, const struct cds_lfht_mm_type *mm, - const struct cds_lfht_alloc *alloc, const struct rcu_flavor_struct *flavor, + const struct cds_lfht_alloc *alloc, pthread_attr_t *attr) { struct cds_lfht *ht; @@ -1714,7 +1714,7 @@ struct cds_lfht *_cds_lfht_new(unsigned long init_size, { return _cds_lfht_new_with_alloc(init_size, min_nr_alloc_buckets, max_nr_buckets, - flags, mm, NULL, flavor, attr); + flags, mm, flavor, NULL, attr); } void cds_lfht_lookup(struct cds_lfht *ht, unsigned long hash,