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);} |