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

Unified Diff: include/atomic

Issue 904473004: Rebased localmods in libcxx to 223109. (Closed)
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/__locale ('k') | include/cmath » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/atomic
diff --git a/include/atomic b/include/atomic
index b01a59f5f96f035887f595b0192a66cb677e0ee1..fe856093528d5c4968339db1b0e58bdfb598abf0 100644
--- a/include/atomic
+++ b/include/atomic
@@ -815,12 +815,24 @@ struct __atomic_base // false
{
mutable _Atomic(_Tp) __a_;
+ // @LOCALMOD-BEGIN The NaCl builtin delays resolution of the lock-free
+ // property until translation time (time at which the
+ // actual target is known).
+#if defined (__pnacl__)
+ _LIBCPP_INLINE_VISIBILITY
+ bool is_lock_free() const volatile _NOEXCEPT
+ {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);}
+ _LIBCPP_INLINE_VISIBILITY
+ bool is_lock_free() const _NOEXCEPT
+ {return __nacl_atomic_is_lock_free(sizeof(_Tp), &__a_);}
+#else
_LIBCPP_INLINE_VISIBILITY
bool is_lock_free() const volatile _NOEXCEPT
{return __c11_atomic_is_lock_free(sizeof(_Tp));}
_LIBCPP_INLINE_VISIBILITY
bool is_lock_free() const _NOEXCEPT
{return __c11_atomic_is_lock_free(sizeof(_Tp));}
+#endif // @LOCALMOD-END
_LIBCPP_INLINE_VISIBILITY
void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
{__c11_atomic_store(&__a_, __d, __m);}
« no previous file with comments | « include/__locale ('k') | include/cmath » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698