mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-09 13:10:30 +01:00
2003-05-15 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work on non-x86. ifdef's are evil.
This commit is contained in:
parent
f0f4335bd9
commit
a1d3ffb0d4
2 changed files with 11 additions and 7 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-05-15 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
|
||||
on non-x86. ifdef's are evil.
|
||||
|
||||
2003-05-15 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* configure.in: 0.11
|
||||
|
|
|
|||
|
|
@ -1822,11 +1822,10 @@ _dbus_atomic_inc (DBusAtomic *atomic)
|
|||
#ifdef DBUS_USE_ATOMIC_INT_486
|
||||
return atomic_exchange_and_add (atomic, 1);
|
||||
#else
|
||||
dbus_atomic_t res;
|
||||
|
||||
dbus_int32_t res;
|
||||
_DBUS_LOCK (atomic);
|
||||
*atomic += 1;
|
||||
res = *atomic;
|
||||
res = atomic->value;
|
||||
atomic->value += 1;
|
||||
_DBUS_UNLOCK (atomic);
|
||||
return res;
|
||||
#endif
|
||||
|
|
@ -1846,11 +1845,11 @@ _dbus_atomic_dec (DBusAtomic *atomic)
|
|||
#ifdef DBUS_USE_ATOMIC_INT_486
|
||||
return atomic_exchange_and_add (atomic, -1);
|
||||
#else
|
||||
dbus_atomic_t res;
|
||||
dbus_int32_t res;
|
||||
|
||||
_DBUS_LOCK (atomic);
|
||||
*atomic -= 1;
|
||||
res = *atomic;
|
||||
res = atomic->value;
|
||||
atomic->value -= 1;
|
||||
_DBUS_UNLOCK (atomic);
|
||||
return res;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue