aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-16 20:37:39 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-16 20:37:39 +0000
commit526956644ad85ddbad445caf93671577fb990b86 (patch)
tree03f08398a0a8e74bfe6670ce6a349d03725d4fa9 /include
parent73a025811c202fee3248bc7756fba6deb79bfdd1 (diff)
Add 'inline' to suppress unused warnings with Android NDK build.
git-svn-id: http://skia.googlecode.com/svn/trunk@3982 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkThread_platform.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/core/SkThread_platform.h b/include/core/SkThread_platform.h
index 44dd0d6890..351477569d 100644
--- a/include/core/SkThread_platform.h
+++ b/include/core/SkThread_platform.h
@@ -19,16 +19,16 @@
/* Just use the GCC atomic intrinsics. They're supported by the NDK toolchain,
* have reasonable performance, and provide full memory barriers
*/
-static __attribute__((always_inline)) int32_t sk_atomic_inc(int32_t *addr) {
+static inline __attribute__((always_inline)) int32_t sk_atomic_inc(int32_t *addr) {
return __sync_fetch_and_add(addr, 1);
}
-static __attribute__((always_inline)) int32_t sk_atomic_dec(int32_t *addr) {
+static inline __attribute__((always_inline)) int32_t sk_atomic_dec(int32_t *addr) {
return __sync_fetch_and_add(addr, -1);
}
-static __attribute__((always_inline)) void sk_membar_aquire__after_atomic_dec() { }
+static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic_dec() { }
-static __attribute__((always_inline)) int32_t sk_atomic_conditional_inc(int32_t* addr) {
+static inline __attribute__((always_inline)) int32_t sk_atomic_conditional_inc(int32_t* addr) {
int32_t value = *addr;
while (true) {
@@ -45,7 +45,7 @@ static __attribute__((always_inline)) int32_t sk_atomic_conditional_inc(int32_t*
}
}
}
-static __attribute__((always_inline)) void sk_membar_aquire__after_atomic_conditional_inc() { }
+static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic_conditional_inc() { }
#else // !SK_BUILD_FOR_ANDROID_NDK