From acf4056a42c77ee70c91c466a0e12b942fe74154 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 25 Feb 2011 17:32:38 +0000 Subject: 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 --- dbus/dbus-connection.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 3e09870d..eca69302 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); } /** -- cgit v1.2.1