Don't inline the contents of _dbus_connection_unlock
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 25 Feb 2011 17:32:38 +0000 (17:32 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 28 Jul 2011 17:23:31 +0000 (18:23 +0100)
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 <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

dbus/dbus-connection.c

index 3e09870dc1ca6a5938759b5fd5a17fc3df894bf2..eca6930265d6d6a91722423fd9ec2eeae562a198 100644 (file)
     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);
 }
 
 /**