[five-or-more] Update to new GLib thread API
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [five-or-more] Update to new GLib thread API
- Date: Sat, 21 Jun 2014 18:09:47 +0000 (UTC)
commit f82dcf656d15ae2ea5ce09a3ebca0c26875fb473
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jun 21 13:08:48 2014 -0500
Update to new GLib thread API
configure.ac | 3 +++
src/games-file-list.c | 11 ++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0ea706a..2a6f969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,11 +15,14 @@ dnl ###########################################################################
dnl Dependencies
dnl ###########################################################################
+GLIB_REQUIRED=2.32
GTK_REQUIRED=3.12.0
RSVG_REQUIRED=2.32.0
PKG_CHECK_MODULES(FIVE_OR_MORE, [
gmodule-2.0
+ glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
librsvg-2.0 >= $RSVG_REQUIRED
])
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]