Effort to reduce the number of exported symbols

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-12-17 14:46:43 +00:00
parent e48e36623b
commit 2d72b1e393
10 changed files with 166 additions and 78 deletions

View File

@@ -92,10 +92,25 @@ __thread_local_data()
// __thread_struct_imp
class __thread_struct_imp
template <class T>
class _LIBCPP_HIDDEN __hidden_allocator
{
typedef vector<__assoc_sub_state*> _AsyncStates;
typedef vector<pair<condition_variable*, mutex*> > _Notify;
public:
typedef T value_type;
T* allocate(size_t __n)
{return static_cast<T*>(::operator new(__n * sizeof(T)));}
void deallocate(T* __p, size_t) {::operator delete((void*)__p);}
size_t max_size() const {return size_t(~0) / sizeof(T);}
};
class _LIBCPP_HIDDEN __thread_struct_imp
{
typedef vector<__assoc_sub_state*,
__hidden_allocator<__assoc_sub_state*> > _AsyncStates;
typedef vector<pair<condition_variable*, mutex*>,
__hidden_allocator<pair<condition_variable*, mutex*> > > _Notify;
_AsyncStates async_states_;
_Notify notify_;