| * Copyright 2014 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| #ifndef SkBarriers_x86_DEFINED |
| #define SkBarriers_x86_DEFINED |
| static inline void sk_compiler_barrier() { _ReadWriteBarrier(); } |
| static inline void sk_compiler_barrier() { asm volatile("" : : : "memory"); } |
| T sk_acquire_load(T* ptr) { |
| // On x86, all loads are acquire loads, so we only need a compiler barrier. |
| void sk_release_store(T* ptr, T val) { |
| // On x86, all stores are release stores, so we only need a compiler barrier. |
| #endif//SkBarriers_x86_DEFINED |