[gnome-robots] Update to new GLib thread API



commit b475dbcf83d4cb2217e42bf7b24f349a06300f85
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jun 21 13:07:56 2014 -0500

    Update to new GLib thread API

 src/games-file-list.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/games-file-list.c b/src/games-file-list.c
index bf92f11..4adab0d 100644
--- a/src/games-file-list.c
+++ b/src/games-file-list.c
@@ -144,7 +144,7 @@ games_file_list_transform_basename (GamesFileList * filelist)
 }
 
 static GSList *image_suffix_list = NULL;
-static GStaticMutex image_suffix_mutex = G_STATIC_MUTEX_INIT;
+static GMutex image_suffix_mutex;
 
 /* We only want to initilise the list of suffixes once, this is
  * the function that does it. It might even be thread safe, not that
@@ -158,14 +158,12 @@ games_image_suffix_list_init (void)
   gchar **suffices;
   gchar **suffix;
 
-  /* Results in strict-aliasing warning due to glib bug #316221 */
-  g_static_mutex_lock (&image_suffix_mutex);
+  g_mutex_lock (&image_suffix_mutex);
 
   /* This check needs to be inside the lock to make sure that another
    * thread haasn't half-completed the list. */
   if (image_suffix_list) {
-    /* Results in strict-aliasing warning due to glib bug #316221 */
-    g_static_mutex_unlock (&image_suffix_mutex);
+    g_mutex_unlock (&image_suffix_mutex);
     return;
   }
 
@@ -193,8 +191,7 @@ games_image_suffix_list_init (void)
 
   g_slist_free (pixbuf_formats);
 
-  /* Results in strict-aliasing warning due to glib bug #316221 */
-  g_static_mutex_unlock (&image_suffix_mutex);
+  g_mutex_unlock (&image_suffix_mutex);
 }
 
 static GList *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]