summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-02-25 17:32:38 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-07-28 18:23:31 +0100
commitacf4056a42c77ee70c91c466a0e12b942fe74154 (patch)
treee27e99bf04cb0070d733da21883dcf1bd01210e3
parentab3984d327f83015b0a0a1c7743de583811df760 (diff)
downloaddbus-acf4056a42c77ee70c91c466a0e12b942fe74154.tar.gz
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 <walters@verbum.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
-rw-r--r--dbus/dbus-connection.c14
1 files 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);
}
/**