mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
trunk/branch integration: VxWorks & Wince
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Thread.cpp
|
// Thread.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Foundation/src/Thread.cpp#16 $
|
// $Id: //poco/1.4/Foundation/src/Thread.cpp#2 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Threading
|
// Package: Threading
|
||||||
@@ -47,6 +47,8 @@
|
|||||||
#else
|
#else
|
||||||
#include "Thread_WIN32.cpp"
|
#include "Thread_WIN32.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(POCO_VXWORKS)
|
||||||
|
#include "Thread_VX.cpp"
|
||||||
#else
|
#else
|
||||||
#include "Thread_POSIX.cpp"
|
#include "Thread_POSIX.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ PooledThread* ThreadPool::getThread()
|
|||||||
pThread->start();
|
pThread->start();
|
||||||
_threads.push_back(pThread);
|
_threads.push_back(pThread);
|
||||||
}
|
}
|
||||||
catch(SystemException& e)
|
catch (...)
|
||||||
{
|
{
|
||||||
delete pThread;
|
delete pThread;
|
||||||
throw;
|
throw;
|
||||||
|
|||||||
@@ -164,8 +164,10 @@ void ThreadImpl::setStackSizeImpl(int size)
|
|||||||
const int PAGE_SIZE = 4096;
|
const int PAGE_SIZE = 4096;
|
||||||
size = ((size + PAGE_SIZE - 1)/PAGE_SIZE)*PAGE_SIZE;
|
size = ((size + PAGE_SIZE - 1)/PAGE_SIZE)*PAGE_SIZE;
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(POCO_ANDROID)
|
||||||
if (size < PTHREAD_STACK_MIN)
|
if (size < PTHREAD_STACK_MIN)
|
||||||
size = PTHREAD_STACK_MIN;
|
size = PTHREAD_STACK_MIN;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
_pData->stackSize = size;
|
_pData->stackSize = size;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ void ThreadImpl::startImpl(Callable target, void* pData)
|
|||||||
if (isRunningImpl())
|
if (isRunningImpl())
|
||||||
throw SystemException("thread already running");
|
throw SystemException("thread already running");
|
||||||
|
|
||||||
|
threadCleanup();
|
||||||
_callbackTarget.callback = target;
|
_callbackTarget.callback = target;
|
||||||
_callbackTarget.pData = pData;
|
_callbackTarget.pData = pData;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user