openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
dbus_int32_t _dbus_atomic_get(DBusAtomic* atomic)
{
#if DBUS_USE_SYNC
    __sync_synchronize();
    return atomic->value;
#else
    dbus_int32_t res;

    pthread_mutex_lock(&atomic_mutex);
    res = atomic->value;
    pthread_mutex_unlock(&atomic_mutex);

    return res;
#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
 */
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
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;
    pthread_mutex_lock(&atomic_mutex);
    res = atomic->value;
    pthread_mutex_unlock(&atomic_mutex);
    return res;
#endif
}
dbus_int32_t _dbus_atomic_get ( DBusAtomic * atomic ) { #if DBUS_USE_SYNC __sync_synchronize ( ) ; return atomic -> value ; #else dbus_int32_t res ; pthread_mutex_lock ( & atomic_mutex ) ; res = atomic -> value ; pthread_mutex_unlock ( & atomic_mutex ) ; return res ; #endif }
Atomically get the value of an integer.
Atomically get the value of an integer .