From dfca09e8c3faf1ff5f037200f71079d5224c5299 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Wed, 29 Oct 2008 22:38:09 -0300 Subject: Minor cleanups --- hardinfo2/benchmark.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hardinfo2') diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index 1efe34ba..d8f07d13 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -90,9 +90,9 @@ gdouble benchmark_parallel_for(guint start, guint end, gpointer callback, gpointer callback_data) { gchar *temp; guint n_cores, iter_per_core, iter; + gdouble elapsed_time; GSList *threads = NULL, *t; GTimer *timer; - gdouble elapsed_time; timer = g_timer_new(); @@ -122,7 +122,7 @@ gdouble benchmark_parallel_for(guint start, guint end, thread = g_thread_create((GThreadFunc) benchmark_parallel_for_dispatcher, pbt, TRUE, NULL); - threads = g_slist_prepend(threads, thread); + threads = g_slist_append(threads, thread); DEBUG("thread %d launched as context %p", 1 + (iter / iter_per_core), threads->data); } @@ -139,7 +139,7 @@ gdouble benchmark_parallel_for(guint start, guint end, g_slist_free(threads); g_timer_destroy(timer); - DEBUG("finishing"); + DEBUG("finishing; all threads took %d seconds to finish", elapsed_time); return elapsed_time; } -- cgit v1.2.3