porting rev. 1915 from 1.4.4 branch (fixed SF# 3539695)

This commit is contained in:
Aleksandar Fabijanic 2012-08-18 04:16:16 +00:00
parent 2adfe178c0
commit 4328b7cba3

View File

@ -186,15 +186,20 @@ void ThreadImpl::startImpl(Runnable& target)
if (_pData->stackSize != 0)
{
if (0 != pthread_attr_setstacksize(&attributes, _pData->stackSize))
{
pthread_attr_destroy(&attributes);
throw SystemException("cannot set thread stack size");
}
}
_pData->pRunnableTarget = ⌖
if (pthread_create(&_pData->thread, &attributes, runnableEntry, this))
{
_pData->pRunnableTarget = 0;
pthread_attr_destroy(&attributes);
throw SystemException("cannot start thread");
}
pthread_attr_destroy(&attributes);
if (_pData->policy == SCHED_OTHER)
{