trunk/branch integration: VxWorks & Wince

This commit is contained in:
Marian Krivos
2011-08-22 18:03:37 +00:00
parent 68306c2960
commit 74019e51a9
6 changed files with 212 additions and 85 deletions

View File

@@ -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();
}
}