mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-02 14:18:04 +02:00
Merge branch 'dbus-1.4'
Conflicts: NEWS
This commit is contained in:
commit
3c4b38b4ba
4 changed files with 46 additions and 26 deletions
10
NEWS
10
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3081,6 +3081,21 @@ _dbus_atomic_dec (DBusAtomic *atomic)
|
|||
return InterlockedDecrement (&atomic->value) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue