diff --git a/src/OpenThreads/pthreads/PThread.cpp b/src/OpenThreads/pthreads/PThread.cpp index 080f6cf6d..8fcf3ab25 100644 --- a/src/OpenThreads/pthreads/PThread.cpp +++ b/src/OpenThreads/pthreads/PThread.cpp @@ -409,16 +409,6 @@ Thread::Thread() if(!s_isInitialized) Init(); PThreadPrivateData *pd = new PThreadPrivateData(); - pd->stackSize = 0; - pd->stackSizeLocked = false; - pd->idSet = false; - pd->setRunning(false); - pd->isCanceled = false; - pd->uniqueId = pd->nextId; - pd->nextId++; - pd->threadPriority = Thread::THREAD_PRIORITY_DEFAULT; - pd->threadPolicy = Thread::THREAD_SCHEDULE_DEFAULT; - pd->cpunum = -1; _prvData = static_cast(pd); diff --git a/src/OpenThreads/pthreads/PThreadPrivateData.h b/src/OpenThreads/pthreads/PThreadPrivateData.h index 0864affcb..b6844a49a 100644 --- a/src/OpenThreads/pthreads/PThreadPrivateData.h +++ b/src/OpenThreads/pthreads/PThreadPrivateData.h @@ -41,7 +41,20 @@ class PThreadPrivateData { private: - PThreadPrivateData() {}; + PThreadPrivateData() + { + stackSize = 0; + stackSizeLocked = false; + idSet = false; + setRunning(false); + isCanceled = false; + tid = 0; + uniqueId = nextId; + nextId++; + threadPriority = Thread::THREAD_PRIORITY_DEFAULT; + threadPolicy = Thread::THREAD_SCHEDULE_DEFAULT; + cpunum = -1; + }; virtual ~PThreadPrivateData() {};