glib: update to 2.56.0.
This commit is contained in:
parent
0473ff3996
commit
c5875acb09
|
@ -27,26 +27,6 @@ Call g_quark_init() where it is expected to have been called.
|
||||||
return quark;
|
return quark;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,6 +213,9 @@
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
G_LOCK (quark_global);
|
|
||||||
+#if !defined(__GLIBC__)
|
|
||||||
+ g_quark_init ();
|
|
||||||
+#endif
|
|
||||||
quark = quark_from_string (string, TRUE);
|
|
||||||
G_UNLOCK (quark_global);
|
|
||||||
|
|
||||||
@@ -243,6 +248,9 @@
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
G_LOCK (quark_global);
|
|
||||||
+#if !defined(__GLIBC__)
|
|
||||||
+ g_quark_init ();
|
|
||||||
+#endif
|
|
||||||
quark = quark_from_string (string, FALSE);
|
|
||||||
G_UNLOCK (quark_global);
|
|
||||||
|
|
||||||
@@ -280,6 +286,7 @@
|
@@ -280,6 +286,7 @@
|
||||||
GQuark quark;
|
GQuark quark;
|
||||||
gchar **quarks_new;
|
gchar **quarks_new;
|
||||||
|
@ -55,23 +35,3 @@ Call g_quark_init() where it is expected to have been called.
|
||||||
if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
|
if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
|
||||||
{
|
{
|
||||||
quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
|
quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
|
||||||
@@ -323,6 +330,9 @@
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
G_LOCK (quark_global);
|
|
||||||
+#if !defined(__GLIBC__)
|
|
||||||
+ g_quark_init ();
|
|
||||||
+#endif
|
|
||||||
quark = quark_from_string (string, TRUE);
|
|
||||||
result = quarks[quark];
|
|
||||||
G_UNLOCK (quark_global);
|
|
||||||
@@ -353,6 +361,9 @@
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
G_LOCK (quark_global);
|
|
||||||
+#if !defined(__GLIBC__)
|
|
||||||
+ g_quark_init ();
|
|
||||||
+#endif
|
|
||||||
quark = quark_from_string (string, FALSE);
|
|
||||||
result = quarks[quark];
|
|
||||||
G_UNLOCK (quark_global);
|
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
This reverts the revert https://github.com/GNOME/glib/commit/4976e8109045b8aa72598668b809418d13e1f031
|
|
||||||
as it turns out to make e.g. LibreOffice eat 100% CPU ( #10807 )
|
|
||||||
|
|
||||||
--- glib/gmain.c 2018-01-08 21:00:49.000000000 +0100
|
|
||||||
+++ glib/gmain.c 2018-01-14 15:30:18.688036447 +0100
|
|
||||||
@@ -277,7 +277,8 @@
|
|
||||||
|
|
||||||
guint next_id;
|
|
||||||
GList *source_lists;
|
|
||||||
- gint in_check_or_prepare;
|
|
||||||
+ gboolean in_check_or_prepare;
|
|
||||||
+ gboolean need_wakeup;
|
|
||||||
|
|
||||||
GPollRec *poll_records;
|
|
||||||
guint n_poll_records;
|
|
||||||
@@ -651,6 +652,7 @@
|
|
||||||
|
|
||||||
context->pending_dispatches = g_ptr_array_new ();
|
|
||||||
|
|
||||||
+ context->need_wakeup = FALSE;
|
|
||||||
context->time_is_fresh = FALSE;
|
|
||||||
|
|
||||||
context->wakeup = g_wakeup_new ();
|
|
||||||
@@ -1127,17 +1129,11 @@
|
|
||||||
static void
|
|
||||||
conditional_wakeup (GMainContext *context)
|
|
||||||
{
|
|
||||||
- /* We want to signal wakeups in two cases:
|
|
||||||
- * 1 When the context is owned by another thread
|
|
||||||
- * 2 When the context owner is NULL (two subcases)
|
|
||||||
- * 2a Possible if the context has never been acquired
|
|
||||||
- * 2b Or if the context has no current owner
|
|
||||||
- *
|
|
||||||
- * At least case 2a) is necessary to ensure backwards compatibility with
|
|
||||||
- * qemu's use of GMainContext.
|
|
||||||
- * https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14
|
|
||||||
+ /* This flag is set if at the start of prepare() we have no other ready
|
|
||||||
+ * sources, and hence would wait in poll(). In that case, any other threads
|
|
||||||
+ * attaching sources will need to signal a wakeup.
|
|
||||||
*/
|
|
||||||
- if (context->owner != G_THREAD_SELF)
|
|
||||||
+ if (context->need_wakeup)
|
|
||||||
g_wakeup_signal (context->wakeup);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3400,6 +3396,10 @@
|
|
||||||
|
|
||||||
LOCK_CONTEXT (context);
|
|
||||||
|
|
||||||
+ /* context->need_wakeup is protected by LOCK_CONTEXT/UNLOCK_CONTEXT,
|
|
||||||
+ * so need not set it yet.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
context->time_is_fresh = FALSE;
|
|
||||||
|
|
||||||
if (context->in_check_or_prepare)
|
|
||||||
@@ -3525,6 +3525,8 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g_source_iter_clear (&iter);
|
|
||||||
+ /* See conditional_wakeup() where this is used */
|
|
||||||
+ context->need_wakeup = (n_ready == 0);
|
|
||||||
|
|
||||||
TRACE (GLIB_MAIN_CONTEXT_AFTER_PREPARE (context, current_priority, n_ready));
|
|
||||||
|
|
||||||
@@ -3659,6 +3661,12 @@
|
|
||||||
|
|
||||||
TRACE (GLIB_MAIN_CONTEXT_BEFORE_CHECK (context, max_priority, fds, n_fds));
|
|
||||||
|
|
||||||
+ /* We don't need to wakeup during check or dispatch, because
|
|
||||||
+ * all sources will be re-evaluated during prepare/query.
|
|
||||||
+ */
|
|
||||||
+ context->need_wakeup = FALSE;
|
|
||||||
+
|
|
||||||
+ /* And if we have a wakeup pending, acknowledge it */
|
|
||||||
for (i = 0; i < n_fds; i++)
|
|
||||||
{
|
|
||||||
if (fds[i].fd == context->wake_up_rec.fd)
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template build file for 'glib'
|
# Template build file for 'glib'
|
||||||
pkgname=glib
|
pkgname=glib
|
||||||
version=2.54.3
|
version=2.56.0
|
||||||
revision=2
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-libelf --disable-fam --with-pcre=system --enable-static"
|
configure_args="--enable-libelf --disable-fam --with-pcre=system --enable-static"
|
||||||
hostmakedepends="automake libtool pkg-config perl python libxslt docbook-xsl"
|
hostmakedepends="automake libtool pkg-config perl python libxslt docbook-xsl"
|
||||||
|
@ -9,9 +9,9 @@ makedepends="zlib-devel pcre-devel libffi-devel dbus-devel elfutils-devel libmou
|
||||||
short_desc="The GNU library of C routines"
|
short_desc="The GNU library of C routines"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="http://www.gtk.org/"
|
homepage="http://www.gtk.org/"
|
||||||
license="LGPL-2.1"
|
license="LGPL-2.1-or-later"
|
||||||
distfiles="${GNOME_SITE}/glib/${version%.*}/glib-$version.tar.xz"
|
distfiles="${GNOME_SITE}/glib/${version%.*}/glib-$version.tar.xz"
|
||||||
checksum=963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8
|
checksum=ecef6e17e97b8d9150d0e8a4b3edee1ac37331213b8a2a87a083deea408a0fc7
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" glib-devel"
|
hostmakedepends+=" glib-devel"
|
||||||
|
|
Loading…
Reference in New Issue