summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/future
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-02-07 15:45:28 +0000
committertheraven <theraven@FreeBSD.org>2013-02-07 15:45:28 +0000
commitd19c702291ff3bd9e769a152e7db96e17f5167f7 (patch)
tree52637438fa031aa783147d9ac30dac90131dffdf /contrib/libc++/include/future
parent0ab90cb3f6b7aa6a5a725c5aadaee31d34eaca96 (diff)
downloadFreeBSD-src-d19c702291ff3bd9e769a152e7db96e17f5167f7.zip
FreeBSD-src-d19c702291ff3bd9e769a152e7db96e17f5167f7.tar.gz
Import new libc++ to head. Various small fixes and cleanups.
MFC after: 2 weeks
Diffstat (limited to 'contrib/libc++/include/future')
-rw-r--r--contrib/libc++/include/future8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/libc++/include/future b/contrib/libc++/include/future
index cf552a9..fa605e7 100644
--- a/contrib/libc++/include/future
+++ b/contrib/libc++/include/future
@@ -470,7 +470,11 @@ public:
{return (__state_ & __constructed) || (__exception_ != nullptr);}
_LIBCPP_INLINE_VISIBILITY
- void __set_future_attached() {__state_ |= __future_attached;}
+ void __set_future_attached()
+ {
+ lock_guard<mutex> __lk(__mut_);
+ __state_ |= __future_attached;
+ }
_LIBCPP_INLINE_VISIBILITY
bool __has_future_attached() const {return __state_ & __future_attached;}
@@ -1753,7 +1757,7 @@ template<class _Rp, class ..._ArgTypes>
class __packaged_task_function<_Rp(_ArgTypes...)>
{
typedef __packaged_task_base<_Rp(_ArgTypes...)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
+ typename aligned_storage<3*sizeof(void*)>::type __buf_;
__base* __f_;
public:
OpenPOWER on IntegriCloud