From: Tim-Philipp Müller Date: Sun, 4 Dec 2011 13:09:53 +0000 (+0000) Subject: benchmarks: g_thread_create() is deprecated in GLib master, use g_thread_try_new... X-Git-Tag: RELEASE-0.10.36~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8b79513c14f71a5cd39e92dadfd3dbba2bb9993;p=platform%2Fupstream%2Fgstreamer.git benchmarks: g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead --- diff --git a/tests/benchmarks/gstbufferstress.c b/tests/benchmarks/gstbufferstress.c index e3f2912..e7ec274 100644 --- a/tests/benchmarks/gstbufferstress.c +++ b/tests/benchmarks/gstbufferstress.c @@ -20,6 +20,7 @@ #include #include #include +#include "gst/glib-compat-private.h" #define MAX_THREADS 1000 @@ -95,7 +96,12 @@ main (gint argc, gchar * argv[]) for (t = 0; t < num_threads; t++) { GError *error = NULL; +#if !GLIB_CHECK_VERSION (2, 31, 0) threads[t] = g_thread_create (run_test, GINT_TO_POINTER (t), TRUE, &error); +#else + threads[t] = g_thread_try_new ("bufferstresstest", run_test, + GINT_TO_POINTER (t), &error); +#endif if (error) { printf ("ERROR: g_thread_create() %s\n", error->message); exit (-1); diff --git a/tests/benchmarks/gstclockstress.c b/tests/benchmarks/gstclockstress.c index b0f721b..60895d9 100644 --- a/tests/benchmarks/gstclockstress.c +++ b/tests/benchmarks/gstclockstress.c @@ -65,7 +65,12 @@ main (gint argc, gchar * argv[]) for (t = 0; t < num_threads; t++) { GError *error = NULL; +#if !GLIB_CHECK_VERSION (2, 31, 0) threads[t] = g_thread_create (run_test, sysclock, TRUE, &error); +#else + threads[t] = g_thread_try_new ("clockstresstest", run_test, + sysclock, &error); +#endif if (error) { printf ("ERROR: g_thread_create() %s\n", error->message); exit (-1); diff --git a/tests/benchmarks/gstpollstress.c b/tests/benchmarks/gstpollstress.c index bf0d548..b384f95 100644 --- a/tests/benchmarks/gstpollstress.c +++ b/tests/benchmarks/gstpollstress.c @@ -21,6 +21,7 @@ #include #include #include +#include "gst/glib-compat-private.h" static GstPoll *set; static GList *fds = NULL; @@ -159,7 +160,12 @@ main (gint argc, gchar * argv[]) for (t = 0; t < num_threads; t++) { GError *error = NULL; +#if !GLIB_CHECK_VERSION (2, 31, 0) threads[t] = g_thread_create (run_test, GINT_TO_POINTER (t), TRUE, &error); +#else + threads[t] = g_thread_try_new ("pollstresstest", run_test, + GINT_TO_POINTER (t), &error); +#endif if (error) { printf ("ERROR: g_thread_create() %s\n", error->message); exit (-1);