summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud/hud_cpufreq.c
diff options
context:
space:
mode:
authorSteven Toth <[email protected]>2016-10-24 10:10:49 -0400
committerNicolai Hähnle <[email protected]>2016-11-07 18:31:52 +0100
commit6ffed086795aaa84ab35668bb59d712cdde34da3 (patch)
tree449619d40097991f2a8e3c105c3a2f18b41ad870 /src/gallium/auxiliary/hud/hud_cpufreq.c
parenta5e733c6b52e93de3000647d075f5ca2f55fcb71 (diff)
gallium/hud: fix a problem where objects are free'd while in use.
Instead of trying to maintain a reference counted list of valid HUD objects, and freeing them accordingly, creating race conditions between unanticipated multiple threads, simply accept they're allocated once and never released until the process terminates. They're a shared resource between multiple threads, so accept they're always available for use. Signed-off-by: Steven Toth <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_cpufreq.c')
-rw-r--r--src/gallium/auxiliary/hud/hud_cpufreq.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/hud/hud_cpufreq.c b/src/gallium/auxiliary/hud/hud_cpufreq.c
index 4501bbbc38c..bfc748b47f9 100644
--- a/src/gallium/auxiliary/hud/hud_cpufreq.c
+++ b/src/gallium/auxiliary/hud/hud_cpufreq.c
@@ -112,14 +112,6 @@ query_cfi_load(struct hud_graph *gr)
}
}
-static void
-free_query_data(void *p)
-{
- struct cpufreq_info *cfi = (struct cpufreq_info *)p;
- list_del(&cfi->list);
- FREE(cfi);
-}
-
/**
* Create and initialize a new object for a specific CPU.
* \param pane parent context.
@@ -162,11 +154,6 @@ hud_cpufreq_graph_install(struct hud_pane *pane, int cpu_index,
gr->query_data = cfi;
gr->query_new_value = query_cfi_load;
- /* Don't use free() as our callback as that messes up Gallium's
- * memory debugger. Use simple free_query_data() wrapper.
- */
- gr->free_query_data = free_query_data;
-
hud_pane_add_graph(pane, gr);
hud_pane_set_max_value(pane, 3000000 /* 3 GHz */);
}