Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: include/atomic

Issue 1286693006: [MIPS] Use nacl_atomic_is_lock_free instead of c11_atomic_is_lock_free (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-libcxx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // -*- C++ -*- 1 // -*- C++ -*-
2 //===--------------------------- atomic -----------------------------------===// 2 //===--------------------------- atomic -----------------------------------===//
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is distributed under the University of Illinois Open Source 6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details. 7 // License. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 10
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 // general atomic<T> 811 // general atomic<T>
812 812
813 template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::valu e> 813 template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::valu e>
814 struct __atomic_base // false 814 struct __atomic_base // false
815 { 815 {
816 mutable _Atomic(_Tp) __a_; 816 mutable _Atomic(_Tp) __a_;
817 817
818 // @LOCALMOD-BEGIN The NaCl builtin delays resolution of the lock-free 818 // @LOCALMOD-BEGIN The NaCl builtin delays resolution of the lock-free
819 // property until translation time (time at which the 819 // property until translation time (time at which the
820 // actual target is known). 820 // actual target is known).
821 #if defined (__pnacl__) 821 #if defined (__pnacl__) || (defined(__mips__) && defined (__native_client__))
822 _LIBCPP_INLINE_VISIBILITY 822 _LIBCPP_INLINE_VISIBILITY
823 bool is_lock_free() const volatile _NOEXCEPT 823 bool is_lock_free() const volatile _NOEXCEPT
824 {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);} 824 {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);}
825 _LIBCPP_INLINE_VISIBILITY 825 _LIBCPP_INLINE_VISIBILITY
826 bool is_lock_free() const _NOEXCEPT 826 bool is_lock_free() const _NOEXCEPT
827 {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);} 827 {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);}
828 #else 828 #else
829 _LIBCPP_INLINE_VISIBILITY 829 _LIBCPP_INLINE_VISIBILITY
830 bool is_lock_free() const volatile _NOEXCEPT 830 bool is_lock_free() const volatile _NOEXCEPT
831 {return __c11_atomic_is_lock_free(sizeof(_Tp));} 831 {return __c11_atomic_is_lock_free(sizeof(_Tp));}
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 #define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE 1791 #define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
1792 #define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE 1792 #define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
1793 1793
1794 #endif // !__has_feature(cxx_atomic) 1794 #endif // !__has_feature(cxx_atomic)
1795 1795
1796 _LIBCPP_END_NAMESPACE_STD 1796 _LIBCPP_END_NAMESPACE_STD
1797 1797
1798 #endif // !_LIBCPP_HAS_NO_THREADS 1798 #endif // !_LIBCPP_HAS_NO_THREADS
1799 1799
1800 #endif // _LIBCPP_ATOMIC 1800 #endif // _LIBCPP_ATOMIC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698