From: Simon McVittie Date: Fri, 25 Feb 2011 17:32:38 +0000 (+0000) Subject: Don't inline the contents of _dbus_connection_unlock X-Git-Tag: dbus-1.5.6~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acf4056a42c77ee70c91c466a0e12b942fe74154;p=thirdparty%2Fdbus.git Don't inline the contents of _dbus_connection_unlock It's about to become more complex, to handle delayed deallocation of messages in order to avoid triggering callbacks while locked. Reviewed-by: Colin Walters Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393 --- diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 3e09870dc..eca693026 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -70,11 +70,7 @@ TOOK_LOCK_CHECK (connection); \ } while (0) -#define CONNECTION_UNLOCK(connection) do { \ - if (TRACE_LOCKS) { _dbus_verbose ("UNLOCK\n"); } \ - RELEASING_LOCK_CHECK (connection); \ - _dbus_mutex_unlock ((connection)->mutex); \ - } while (0) +#define CONNECTION_UNLOCK(connection) _dbus_connection_unlock (connection) #define SLOTS_LOCK(connection) do { \ _dbus_mutex_lock ((connection)->slot_mutex); \ @@ -390,7 +386,13 @@ _dbus_connection_lock (DBusConnection *connection) void _dbus_connection_unlock (DBusConnection *connection) { - CONNECTION_UNLOCK (connection); + if (TRACE_LOCKS) + { + _dbus_verbose ("UNLOCK\n"); + } + + RELEASING_LOCK_CHECK (connection); + _dbus_mutex_unlock (connection->mutex); } /**