+/**
+ * Like dbus_server_ref() but does not acquire the lock (must already be held)
+ *
+ * @param server the server.
+ */
+void
+_dbus_server_ref_unlocked (DBusServer *server)
+{
+ dbus_int32_t old_refcount;
+
+ _dbus_assert (server != NULL);
+ HAVE_LOCK_CHECK (server);
+
+ old_refcount = _dbus_atomic_inc (&server->refcount);
+ _dbus_assert (old_refcount > 0);
+ _dbus_server_trace_ref (server, old_refcount, old_refcount + 1,
+ "ref_unlocked");
+}
+
+/**
+ * Like dbus_server_unref() but does not acquire the lock (must already be held)
+ *
+ * @param server the server.
+ */
+void
+_dbus_server_unref_unlocked (DBusServer *server)
+{
+ dbus_int32_t old_refcount;
+
+ /* Keep this in sync with dbus_server_unref */
+
+ _dbus_assert (server != NULL);
+
+ HAVE_LOCK_CHECK (server);
+
+ old_refcount = _dbus_atomic_dec (&server->refcount);
+ _dbus_assert (old_refcount > 0);
+
+ _dbus_server_trace_ref (server, old_refcount, old_refcount - 1,
+ "unref_unlocked");
+
+ if (old_refcount == 1)
+ {
+ _dbus_assert (server->disconnected);
+
+ SERVER_UNLOCK (server);
+
+ _dbus_assert (server->vtable->finalize != NULL);
+
+ (* server->vtable->finalize) (server);
+ }
+}
+