Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6d567bd authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am 8e1f3f58: am 2c2fdae7: am 633be1f3: Merge "Remove android_atomic_swap from mips & mips64."

* commit '8e1f3f58':
  Remove android_atomic_swap from mips & mips64.
parents 7688ef00 8e1f3f58
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -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
android_atomic_add(int32_t increment, volatile int32_t *ptr)
{
+0 −17
Original line number Diff line number Diff line
@@ -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);
}

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 android_atomic_add(int32_t increment, volatile int32_t *ptr)
{