| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkThread.h" | 10 #include "SkThread.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 void sk_membar_aquire__after_atomic_dec() { } | 30 void sk_membar_aquire__after_atomic_dec() { } |
| 31 | 31 |
| 32 int32_t sk_atomic_conditional_inc(int32_t* addr) { | 32 int32_t sk_atomic_conditional_inc(int32_t* addr) { |
| 33 int32_t value = *addr; | 33 int32_t value = *addr; |
| 34 if (value != 0) ++*addr; | 34 if (value != 0) ++*addr; |
| 35 return value; | 35 return value; |
| 36 } | 36 } |
| 37 void sk_membar_aquire__after_atomic_conditional_inc() { } | 37 void sk_membar_aquire__after_atomic_conditional_inc() { } |
| 38 | 38 |
| 39 int32_t sk_atomic_unprotected_read(const volatile int32_t & x) { |
| 40 return x; |
| 41 } |
| 42 |
| 39 SkMutex::SkMutex() {} | 43 SkMutex::SkMutex() {} |
| 40 | 44 |
| 41 SkMutex::~SkMutex() {} | 45 SkMutex::~SkMutex() {} |
| 42 | 46 |
| 43 #ifndef SK_USE_POSIX_THREADS | 47 #ifndef SK_USE_POSIX_THREADS |
| 44 void SkMutex::acquire() {} | 48 void SkMutex::acquire() {} |
| 45 void SkMutex::release() {} | 49 void SkMutex::release() {} |
| 46 #endif | 50 #endif |
| 47 | 51 |
| 48 ////////////////////////////////////////////////////////////////////////// | 52 ////////////////////////////////////////////////////////////////////////// |
| 49 | 53 |
| 50 static void* gSpecific; | 54 static void* gSpecific; |
| 51 | 55 |
| 52 void* SkTLS::PlatformGetSpecific(bool) { | 56 void* SkTLS::PlatformGetSpecific(bool) { |
| 53 return gSpecific; | 57 return gSpecific; |
| 54 } | 58 } |
| 55 | 59 |
| 56 void SkTLS::PlatformSetSpecific(void* ptr) { | 60 void SkTLS::PlatformSetSpecific(void* ptr) { |
| 57 gSpecific = ptr; | 61 gSpecific = ptr; |
| 58 } | 62 } |
| OLD | NEW |