diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkThread.h | 1 | ||||
-rw-r--r-- | include/core/SkThread_platform.h | 17 |
2 files changed, 2 insertions, 16 deletions
diff --git a/include/core/SkThread.h b/include/core/SkThread.h index 5b1fc1c213..2fd5052b06 100644 --- a/include/core/SkThread.h +++ b/include/core/SkThread.h @@ -16,7 +16,6 @@ /****** SkThread_platform needs to define the following... int32_t sk_atomic_inc(int32_t*); -int32_t sk_atomic_add(int32_t*, int32_t); int32_t sk_atomic_dec(int32_t*); int32_t sk_atomic_conditional_inc(int32_t*); diff --git a/include/core/SkThread_platform.h b/include/core/SkThread_platform.h index 19fcd4a743..cb05c50f3a 100644 --- a/include/core/SkThread_platform.h +++ b/include/core/SkThread_platform.h @@ -23,10 +23,6 @@ static inline __attribute__((always_inline)) int32_t sk_atomic_inc(int32_t *addr return __sync_fetch_and_add(addr, 1); } -static inline __attribute__((always_inline)) int32_t sk_atomic_add(int32_t *addr, int32_t value) { - return __sync_fetch_and_add(addr, value); -} - static inline __attribute__((always_inline)) int32_t sk_atomic_dec(int32_t *addr) { return __sync_fetch_and_add(addr, -1); } @@ -58,9 +54,8 @@ static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic */ #include <utils/Atomic.h> -#define sk_atomic_inc(addr) android_atomic_inc(addr) -#define sk_atomic_add(addr, value) android_atomic_add(value, addr) -#define sk_atomic_dec(addr) android_atomic_dec(addr) +#define sk_atomic_inc(addr) android_atomic_inc(addr) +#define sk_atomic_dec(addr) android_atomic_dec(addr) void sk_membar_aquire__after_atomic_dec() { //HACK: Android is actually using full memory barriers. // Should this change, uncomment below. @@ -97,14 +92,6 @@ void sk_membar_aquire__after_atomic_conditional_inc() { */ SK_API int32_t sk_atomic_inc(int32_t* addr); -/** Implemented by the porting layer, this function adds value to the int - specified by the address (in a thread-safe manner), and returns the - previous value. - No additional memory barrier is required. - This must act as a compiler barrier. - */ -SK_API int32_t sk_atomic_add(int32_t* addr, int32_t value); - /** Implemented by the porting layer, this function subtracts one from the int specified by the address (in a thread-safe manner), and returns the previous value. |