| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2013 Google Inc. All rights reserved. | 2 // Copyright 2013 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr, | 200 inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr, |
| 201 Atomic64 old_value, | 201 Atomic64 old_value, |
| 202 Atomic64 new_value) { | 202 Atomic64 new_value) { |
| 203 Atomic64 cmp = old_value; | 203 Atomic64 cmp = old_value; |
| 204 __tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value, | 204 __tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value, |
| 205 __tsan_memory_order_release, __tsan_memory_order_relaxed); | 205 __tsan_memory_order_release, __tsan_memory_order_relaxed); |
| 206 return cmp; | 206 return cmp; |
| 207 } | 207 } |
| 208 | 208 |
| 209 inline void MemoryBarrierInternal() { | 209 inline void MemoryBarrier() { |
| 210 __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst); | 210 __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace internal | 213 } // namespace internal |
| 214 } // namespace protobuf | 214 } // namespace protobuf |
| 215 } // namespace google | 215 } // namespace google |
| 216 | 216 |
| 217 #undef ATOMICOPS_COMPILER_BARRIER | 217 #undef ATOMICOPS_COMPILER_BARRIER |
| 218 | 218 |
| 219 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_TSAN_H_ | 219 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_TSAN_H_ |
| OLD | NEW |