mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-13 13:29:58 -05:00
the native atomic ops implementation for amd64 seems to work fine
This commit is contained in:
parent
ca38446e6b
commit
a45440d5c9
1 changed files with 3 additions and 3 deletions
|
|
@ -42,7 +42,7 @@
|
||||||
#error "Please include config.h before including this file!"
|
#error "Please include config.h before including this file!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ATOMIC_BUILTINS
|
#if HAVE_ATOMIC_BUILTINS
|
||||||
|
|
||||||
/* __sync based implementation */
|
/* __sync based implementation */
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, v
|
||||||
|
|
||||||
#elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__))
|
#elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__))
|
||||||
|
|
||||||
#error "The native atomic operations implementation for AMD64 has not been tested. libatomic_ops is known to not work properly on AMD64 and your gcc version is too old for the gcc-builtin atomic ops support. You have three options now: make the native atomic operations implementation for AMD64 work, fix libatomic_ops, or upgrade your GCC."
|
#warn "The native atomic operations implementation for AMD64 has not been tested. libatomic_ops is known to not work properly on AMD64 and your gcc version is too old for the gcc-builtin atomic ops support. You have three options now: make the native atomic operations implementation for AMD64 work, fix libatomic_ops, or upgrade your GCC."
|
||||||
|
|
||||||
/* Addapted from glibc */
|
/* Addapted from glibc */
|
||||||
|
|
||||||
|
|
@ -156,7 +156,7 @@ static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i)
|
||||||
: "=a" (result), "=m" (a->value)
|
: "=a" (result), "=m" (a->value)
|
||||||
: "r" (new_i), "m" (a->value), "0" (old_i));
|
: "r" (new_i), "m" (a->value), "0" (old_i));
|
||||||
|
|
||||||
return result == oldval;
|
return result == old_i;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct pa_atomic_ptr {
|
typedef struct pa_atomic_ptr {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue