LWG issue 2143: ios_base::xalloc should be thread-safe

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2013-10-12 19:13:52 +00:00
parent 1206720869
commit 206ce1faaf
2 changed files with 12 additions and 1 deletions

View File

@@ -149,8 +149,11 @@ ios_base::getloc() const
}
// xalloc
#if __has_feature(cxx_atomic)
atomic<int> ios_base::__xindex_ = ATOMIC_VAR_INIT(0);
#else
int ios_base::__xindex_ = 0;
#endif
int
ios_base::xalloc()