summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-07-29 12:52:32 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-07-29 12:52:32 +0100
commit3c4b38b4bac0d23cf8c65154e1f2ae3506e42a33 (patch)
treee719c3124d912dc49ac17f380f033c748528b6d2
parente3c12a86d6bea9e212c58ddbf3dc4640b74f9021 (diff)
parentbae9bb547f0ccee9b84d1bdef8f21b096d219756 (diff)
downloaddbus-3c4b38b4bac0d23cf8c65154e1f2ae3506e42a33.tar.gz
Merge branch 'dbus-1.4'
Conflicts: NEWS
-rw-r--r--NEWS10
-rw-r--r--dbus/dbus-sysdeps-unix.c23
-rw-r--r--dbus/dbus-sysdeps-win.c15
-rw-r--r--dbus/dbus-sysdeps.c24
4 files changed, 46 insertions, 26 deletions
diff --git a/NEWS b/NEWS
index 05ddf059..6763c5fb 100644
--- a/NEWS
+++ b/NEWS
@@ -40,13 +40,19 @@ Other changes:
a running dbus-daemon if enabled at configure time with --enable-stats
(fd.o #34040, Simon McVittie)
+• Fix various typos (fd.o #27227, fd.o #38284; Sascha Silbe, Simon McVittie)
+
• Documentation (fd.o #36156, Simon McVittie):
· let xsltproc be overridden as usual: ./configure XSLTPROC=myxsltproc
· install more documentation automatically, including man2html output
· put dbus.devhelp in the right place (it must go in ${htmldir})
-• Unix-specific (fd.o #33465, Simon McVittie):
- · opt-in to fd passing on Solaris
+• Unix-specific:
+ · look for system services in /lib/dbus-1/system-services in addition to all
+ the other well-known locations; note that this should always be /lib,
+ even on platforms where shared libraries on the root FS would go in /lib64,
+ /lib/x86_64-linux-gnu or similar (fd.o #35229, Lennart Poettering)
+ · opt-in to fd passing on Solaris (fd.o #33465, Simon McVittie)
• Windows-specific (Ralf Habacker):
· fix use of a mutex for autolaunch server detection
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 57e5b4be..f9315702 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
@@ -2348,6 +2348,29 @@ _dbus_atomic_dec (DBusAtomic *atomic)
#endif
}
+/**
+ * Atomically get the value of an integer. It may change at any time
+ * thereafter, so this is mostly only useful for assertions.
+ *
+ * @param atomic pointer to the integer to get
+ * @returns the value at this moment
+ */
+dbus_int32_t
+_dbus_atomic_get (DBusAtomic *atomic)
+{
+#if DBUS_USE_SYNC
+ __sync_synchronize ();
+ return atomic->value;
+#else
+ dbus_int32_t res;
+
+ _DBUS_LOCK (atomic);
+ res = atomic->value;
+ _DBUS_UNLOCK (atomic);
+ return res;
+#endif
+}
+
#ifdef DBUS_BUILD_TESTS
/** Gets our GID
* @returns process GID
diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c
index f9afadad..a8c60bda 100644
--- a/dbus/dbus-sysdeps-win.c
+++ b/dbus/dbus-sysdeps-win.c
@@ -3082,6 +3082,21 @@ _dbus_atomic_dec (DBusAtomic *atomic)
}
/**
+ * Atomically get the value of an integer. It may change at any time
+ * thereafter, so this is mostly only useful for assertions.
+ *
+ * @param atomic pointer to the integer to get
+ * @returns the value at this moment
+ */
+dbus_int32_t
+_dbus_atomic_get (DBusAtomic *atomic)
+{
+ /* this is what GLib does, hopefully it's right... */
+ MemoryBarrier ();
+ return atomic->value;
+}
+
+/**
* Called when the bus daemon is signaled to reload its configuration; any
* caches should be nuked. Of course any caches that need explicit reload
* are probably broken, but c'est la vie.
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index 18f69dc3..bab516de 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -1067,30 +1067,6 @@ _dbus_strerror_from_errno (void)
return _dbus_strerror (errno);
}
-/**
- * Atomically get the value of an integer. It may change at any time
- * thereafter, so this is mostly only useful for assertions.
- *
- * This function temporarily increases the atomic integer, so only
- * use it in contexts where that would be OK (such as refcounts).
- *
- * @param atomic pointer to the integer to increment
- * @returns the value at this moment
- */
-dbus_int32_t
-_dbus_atomic_get (DBusAtomic *atomic)
-{
- dbus_int32_t old_value;
-
- /* On Windows we use InterlockedIncrement and InterlockedDecrement,
- * and there is no InterlockedGet, so we have to change the value.
- * Increasing it is less likely to have bad side-effects (for instance,
- * it's OK for refcounts). */
- old_value = _dbus_atomic_inc (atomic);
- _dbus_atomic_dec (atomic);
- return old_value;
-}
-
/** @} end of sysdeps */
/* tests in dbus-sysdeps-util.c */