diff options
author | digit@google.com <digit@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-11 17:44:41 +0000 |
---|---|---|
committer | digit@google.com <digit@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-11 17:44:41 +0000 |
commit | f66436cff70ad44abf3f576d5cc2034bfccfecf7 (patch) | |
tree | c79cf5113d6f84b3cc328266d12d817145b5b883 /src | |
parent | 6da3d1757cfee75c25a86b580834dc49d8b53f05 (diff) |
android: optimize atomics routines
This patch provides a slightly optimized implementation of
atomic increment/decrement functions by using static inlined
versions of the gcc intrinsics.
Review URL: http://codereview.appspot.com/5498069
git-svn-id: http://skia.googlecode.com/svn/trunk@3012 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/ports/SkThread_pthread.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ports/SkThread_pthread.cpp b/src/ports/SkThread_pthread.cpp index bab26e9928..51c0859031 100644 --- a/src/ports/SkThread_pthread.cpp +++ b/src/ports/SkThread_pthread.cpp @@ -10,6 +10,8 @@ #include <pthread.h> #include <errno.h> +#ifndef SK_BUILD_FOR_ANDROID + /** We prefer the GCC intrinsic implementation of the atomic operations over the SkMutex-based implementation. The SkMutex version suffers from static @@ -61,6 +63,8 @@ int32_t sk_atomic_dec(int32_t* addr) #endif +#endif // SK_BUILD_FOR_ANDROID + ////////////////////////////////////////////////////////////////////////////// static void print_pthread_error(int status) |