mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
trunk/branch integration: VxWorks & Wince
This commit is contained in:
@@ -70,12 +70,18 @@ TLSAbstractSlot*& ThreadLocalStorage::get(const void* key)
|
||||
{
|
||||
TLSMap::iterator it = _map.find(key);
|
||||
if (it == _map.end())
|
||||
return _map.insert(TLSMap::value_type(key, 0)).first->second;
|
||||
return _map.insert(TLSMap::value_type(key, reinterpret_cast<Poco::TLSAbstractSlot*>(0))).first->second;
|
||||
else
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
static SingletonHolder<ThreadLocalStorage> sh;
|
||||
}
|
||||
|
||||
|
||||
ThreadLocalStorage& ThreadLocalStorage::current()
|
||||
{
|
||||
Thread* pThread = Thread::current();
|
||||
@@ -85,7 +91,6 @@ ThreadLocalStorage& ThreadLocalStorage::current()
|
||||
}
|
||||
else
|
||||
{
|
||||
static SingletonHolder<ThreadLocalStorage> sh;
|
||||
return *sh.get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user