am 633be1f3: Merge "Remove android_atomic_swap from mips & mips64."
* commit '633be1f37e11703be90fc2c900f548a68b8c86d7': Remove android_atomic_swap from mips & mips64.
This commit is contained in:
commit
2c2fdae754
2 changed files with 0 additions and 34 deletions
|
|
@ -116,23 +116,6 @@ android_atomic_release_cas(int32_t old_value,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern ANDROID_ATOMIC_INLINE int32_t
|
|
||||||
android_atomic_swap(int32_t new_value, volatile int32_t *ptr)
|
|
||||||
{
|
|
||||||
int32_t prev, status;
|
|
||||||
do {
|
|
||||||
__asm__ __volatile__ (
|
|
||||||
" move %[status], %[new_value]\n"
|
|
||||||
" ll %[prev], (%[ptr])\n"
|
|
||||||
" sc %[status], (%[ptr])\n"
|
|
||||||
: [prev] "=&r" (prev), [status] "=&r" (status)
|
|
||||||
: [ptr] "r" (ptr), [new_value] "r" (new_value)
|
|
||||||
);
|
|
||||||
} while (__builtin_expect(status == 0, 0));
|
|
||||||
android_memory_barrier();
|
|
||||||
return prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern ANDROID_ATOMIC_INLINE int32_t
|
extern ANDROID_ATOMIC_INLINE int32_t
|
||||||
android_atomic_add(int32_t increment, volatile int32_t *ptr)
|
android_atomic_add(int32_t increment, volatile int32_t *ptr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -168,23 +168,6 @@ int64_t android_atomic_release_cas64(int64_t old_value, int64_t new_value,
|
||||||
return android_atomic_cas64(old_value, new_value, ptr);
|
return android_atomic_cas64(old_value, new_value, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern ANDROID_ATOMIC_INLINE
|
|
||||||
int32_t android_atomic_swap(int32_t new_value, volatile int32_t *ptr)
|
|
||||||
{
|
|
||||||
int32_t prev, status;
|
|
||||||
do {
|
|
||||||
__asm__ __volatile__ (
|
|
||||||
" move %[status], %[new_value]\n"
|
|
||||||
" ll %[prev], (%[ptr])\n"
|
|
||||||
" sc %[status], (%[ptr])\n"
|
|
||||||
: [prev] "=&r" (prev), [status] "=&r" (status)
|
|
||||||
: [ptr] "r" (ptr), [new_value] "r" (new_value)
|
|
||||||
);
|
|
||||||
} while (__builtin_expect(status == 0, 0));
|
|
||||||
android_memory_barrier();
|
|
||||||
return prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern ANDROID_ATOMIC_INLINE
|
extern ANDROID_ATOMIC_INLINE
|
||||||
int32_t android_atomic_add(int32_t increment, volatile int32_t *ptr)
|
int32_t android_atomic_add(int32_t increment, volatile int32_t *ptr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue