qht: drop ht argument from qht iterators
Accessing the HT from an iterator results almost always
in a deadlock. Given that only one qht-internal function
uses this argument, drop it from the interface.
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
diff --git a/tests/test-qht.c b/tests/test-qht.c
index 1ec039d..4d23cef 100644
--- a/tests/test-qht.c
+++ b/tests/test-qht.c
@@ -98,7 +98,7 @@
qht_statistics_destroy(&stats);
}
-static void count_func(struct qht *ht, void *p, uint32_t hash, void *userp)
+static void count_func(void *p, uint32_t hash, void *userp)
{
unsigned int *curr = userp;
@@ -122,7 +122,7 @@
g_assert_cmpuint(curr, ==, count);
}
-static void sum_func(struct qht *ht, void *p, uint32_t hash, void *userp)
+static void sum_func(void *p, uint32_t hash, void *userp)
{
uint32_t *sum = userp;
uint32_t a = *(uint32_t *)p;
@@ -138,7 +138,7 @@
g_assert_cmpuint(sum, ==, expected);
}
-static bool rm_mod_func(struct qht *ht, void *p, uint32_t hash, void *userp)
+static bool rm_mod_func(void *p, uint32_t hash, void *userp)
{
uint32_t a = *(uint32_t *)p;
unsigned int mod = *(unsigned int *)userp;