[oe-commits] Michael 'Mickey' Lauer : dbus 1.3.0: add patch to improve threading stability
git version control
git at git.openembedded.org
Sat Mar 13 00:30:11 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 8c6131dc17cadb3279bc64729dc95e51734eac9b
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=8c6131dc17cadb3279bc64729dc95e51734eac9b
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Sat Mar 13 01:29:20 2010 +0100
dbus 1.3.0: add patch to improve threading stability
---
.../dbus-1.3.0/improve-threading-stability.patch | 38 ++++++++++++++++++++
recipes/dbus/dbus_1.3.0.bb | 3 +-
2 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/recipes/dbus/dbus-1.3.0/improve-threading-stability.patch b/recipes/dbus/dbus-1.3.0/improve-threading-stability.patch
new file mode 100644
index 0000000..59de6ef
--- /dev/null
+++ b/recipes/dbus/dbus-1.3.0/improve-threading-stability.patch
@@ -0,0 +1,38 @@
+From ae95a0ff9651a774cd983436d7e656c62492659c Mon Sep 17 00:00:00 2001
+From: Michael Meeks <michael.meeks at novell.com>
+Date: Fri, 12 Mar 2010 16:50:27 +0000
+Subject: [DBusConnection] When handling a watch, return if another thread is doing I/O
+
+http://lists.freedesktop.org/archives/dbus/2010-March/012337.html
+
+Previously, the watch handler would block until the I/O path was available.
+However, if another non-main thread was doing a synchronous call, this would
+cause the main thread to block on that thread, a highly undesirable
+thing because it's important for the main thread to remain responsive
+for user interfaces.
+
+Signed-off-by: Colin Walters <walters at verbum.org>
+Signed-off-by: Thiago Macieira <thiago at kde.org>
+---
+diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
+index 5fb234d..69fdf53 100644
+--- a/dbus/dbus-connection.c
++++ b/dbus/dbus-connection.c
+@@ -1435,7 +1435,14 @@ _dbus_connection_handle_watch (DBusWatch *watch,
+ _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME);
+
+ CONNECTION_LOCK (connection);
+- _dbus_connection_acquire_io_path (connection, -1);
++
++ if (!_dbus_connection_acquire_io_path (connection, 1))
++ {
++ /* another thread is handling the message */
++ CONNECTION_UNLOCK (connection);
++ return TRUE;
++ }
++
+ HAVE_LOCK_CHECK (connection);
+ retval = _dbus_transport_handle_watch (connection->transport,
+ watch, condition);
+--
+cgit v0.8.3-6-g21f6
diff --git a/recipes/dbus/dbus_1.3.0.bb b/recipes/dbus/dbus_1.3.0.bb
index 3abc40a..a06d9dc 100644
--- a/recipes/dbus/dbus_1.3.0.bb
+++ b/recipes/dbus/dbus_1.3.0.bb
@@ -10,6 +10,7 @@ SRC_URI = "\
file://will-5.patch;patch=1 \
file://will-6.patch;patch=1 \
\
+ file://improve-threading-stability.patch;patch=1 \
file://tmpdir.patch;patch=1 \
file://fix-install-daemon.patch;patch=1 \
file://0001-Make-the-default-DBus-reply-timeout-configurable.patch;patch=1 \
@@ -19,4 +20,4 @@ SRC_URI = "\
# This is the development version of dbus that will lead to 1.4.x
DEFAULT_PREFERENCE = "-1"
-PR = "r1"
+PR = "r2"
More information about the Openembedded-commits
mailing list