Home | History | Annotate | Download | only in wtf

Lines Matching full:data

24  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
80 struct Data : Noncopyable {
81 Data(T* value, ThreadSpecific<T>* owner) : value(value), owner(owner) {}
83 ~Data() { owner->destroy(this); }
100 QThreadStorage<Data*> m_key;
150 Data* data = static_cast<Data*>(pthread_getspecific(m_key));
151 return data ? data->value : 0;
158 pthread_setspecific(m_key, new Data(ptr, this));
177 Data* data = static_cast<Data*>(m_key.localData());
178 return data ? data->value : 0;
185 Data* data = new Data(ptr, this);
186 m_key.setLocalData(data);
198 // 2) We do not need to hold many instances of ThreadSpecific<> data. This fixed number should be far enough.
228 Data* data = static_cast<Data*>(TlsGetValue(tlsKeys()[m_index]));
229 return data ? data->value : 0;
236 Data* data = new Data(ptr, this);
237 data->destructor = &ThreadSpecific<T>::destroy;
238 TlsSetValue(tlsKeys()[m_index], data);
250 Data* data = static_cast<Data*>(ptr);
253 // We want get() to keep working while data destructor works, because it can be called indirectly by the destructor.
255 pthread_setspecific(data->owner->m_key, ptr);
259 data->owner->m_key.setLocalData(data);
262 data->value->~T();
263 fastFree(data->value);
266 pthread_setspecific(data->owner->m_key, 0);
270 TlsSetValue(tlsKeys()[data->owner->m_index], 0);
276 delete data;