From 8c5aef691745bc06750886e10bfda84f2b749ed8 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 15 Feb 2024 17:29:22 -0500 Subject: [PATCH] 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 --- include/urcu/rculfhash.h | 4 ++-- src/rculfhash.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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, -- 2.34.1