aboutsummaryrefslogtreecommitdiff
path: root/util/qsp.c
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-09-10 13:06:12 -0400
committerRichard Henderson <richard.henderson@linaro.org>2018-09-26 08:55:54 -0700
commit78255ba2cc00f41d96aa2911933764f59f24c958 (patch)
tree06b33056d900b7cdc79ac7d8540461c6768a4c15 /util/qsp.c
parentca8897a44cda60693e66085f1e916e76b94400df (diff)
downloadqemu-78255ba2cc00f41d96aa2911933764f59f24c958.zip
qemu-78255ba2cc00f41d96aa2911933764f59f24c958.tar.gz
qemu-78255ba2cc00f41d96aa2911933764f59f24c958.tar.bz2
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>
Diffstat (limited to 'util/qsp.c')
-rw-r--r--util/qsp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/util/qsp.c b/util/qsp.c
index b0c2575..2de3a97 100644
--- a/util/qsp.c
+++ b/util/qsp.c
@@ -533,7 +533,7 @@ static gint qsp_tree_cmp(gconstpointer ap, gconstpointer bp, gpointer up)
}
}
-static void qsp_sort(struct qht *ht, void *p, uint32_t h, void *userp)
+static void qsp_sort(void *p, uint32_t h, void *userp)
{
QSPEntry *e = p;
GTree *tree = userp;
@@ -541,7 +541,7 @@ static void qsp_sort(struct qht *ht, void *p, uint32_t h, void *userp)
g_tree_insert(tree, e, NULL);
}
-static void qsp_aggregate(struct qht *global_ht, void *p, uint32_t h, void *up)
+static void qsp_aggregate(void *p, uint32_t h, void *up)
{
struct qht *ht = up;
const QSPEntry *e = p;
@@ -553,7 +553,7 @@ static void qsp_aggregate(struct qht *global_ht, void *p, uint32_t h, void *up)
qsp_entry_aggregate(agg, e);
}
-static void qsp_iter_diff(struct qht *orig, void *p, uint32_t hash, void *htp)
+static void qsp_iter_diff(void *p, uint32_t hash, void *htp)
{
struct qht *ht = htp;
QSPEntry *old = p;
@@ -583,8 +583,7 @@ static void qsp_diff(struct qht *orig, struct qht *new)
qht_iter(orig, qsp_iter_diff, new);
}
-static void
-qsp_iter_callsite_coalesce(struct qht *orig, void *p, uint32_t h, void *htp)
+static void qsp_iter_callsite_coalesce(void *p, uint32_t h, void *htp)
{
struct qht *ht = htp;
QSPEntry *old = p;
@@ -603,7 +602,7 @@ qsp_iter_callsite_coalesce(struct qht *orig, void *p, uint32_t h, void *htp)
e->n_acqs += old->n_acqs;
}
-static void qsp_ht_delete(struct qht *ht, void *p, uint32_t h, void *htp)
+static void qsp_ht_delete(void *p, uint32_t h, void *htp)
{
g_free(p);
}