diff options
Diffstat (limited to 'libcxx/src/thread.cpp')
-rw-r--r-- | libcxx/src/thread.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp index 3d388e9f030..aa075133a31 100644 --- a/libcxx/src/thread.cpp +++ b/libcxx/src/thread.cpp @@ -83,7 +83,12 @@ sleep_for(const chrono::nanoseconds& ns) } // this_thread -__thread_specific_ptr<__thread_struct> __thread_local_data; +__thread_specific_ptr<__thread_struct>& +__thread_local_data() +{ + static __thread_specific_ptr<__thread_struct> __p; + return __p; +} // __thread_struct_imp |