blob: a87543d460c15008357f502d30cb4a13a8da4ff9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/include/__locale b/include/__locale
index 90dcad3..538bf7a 100644
--- a/include/__locale
+++ b/include/__locale
@@ -15,6 +15,7 @@
#include <__memory/shared_ptr.h> // __shared_count
#include <__mutex/once_flag.h>
#include <__type_traits/make_unsigned.h>
+#include <atomic>
#include <cctype>
#include <clocale>
#include <cstdint>
@@ -154,8 +155,7 @@ private:
class _LIBCPP_EXPORTED_FROM_ABI locale::id
{
- once_flag __flag_;
- int32_t __id_;
+ std::atomic<int32_t> __id_;
static int32_t __next_id;
public:
|