Convert __thread_local_data to the singleton pattern
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@116500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user