libCom: Increase stack sizes for Windows and Posix
Windows stack sizes were the same as vxWorks - tiny. The stack sizes are now multiples of sizeof(void*). On 32-bit systems they give 256KB, 512KB and 1MB; 64-bit systems get twice those numbers. Fixes lp:903448
This commit is contained in:
@@ -23,6 +23,9 @@ fixed in this release:</p>
|
||||
<a href="https://launchpad.net/bugs/907761">
|
||||
reading only 1st char of link in "long string" ($) syntax fails in read
|
||||
error</a></li>
|
||||
<li>903448
|
||||
<a href="https://launchpad.net/bugs/903448">
|
||||
RHEL5 nss ldap update cause stack size related failure</a></li>
|
||||
</ul>
|
||||
|
||||
<h4>Comments in iocsh scripts</h4>
|
||||
|
||||
@@ -446,7 +446,10 @@ epicsShareFunc epicsThreadBooleanStatus epicsShareAPI epicsThreadHighestPriority
|
||||
epicsShareFunc unsigned int epicsShareAPI
|
||||
epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
|
||||
{
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {4000, 6000, 11000};
|
||||
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
|
||||
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
|
||||
};
|
||||
|
||||
if (stackSizeClass<epicsThreadStackSmall) {
|
||||
fprintf ( stderr,
|
||||
|
||||
@@ -398,9 +398,6 @@ static void epicsThreadInit(void)
|
||||
}
|
||||
|
||||
|
||||
#define ARCH_STACK_FACTOR 1024
|
||||
|
||||
|
||||
epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadStackSizeClass stackSizeClass)
|
||||
{
|
||||
#if ! defined (_POSIX_THREAD_ATTR_STACKSIZE)
|
||||
@@ -408,8 +405,10 @@ epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadSt
|
||||
#elif defined (OSITHREAD_USE_DEFAULT_STACK)
|
||||
return 0;
|
||||
#else
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] =
|
||||
{128*ARCH_STACK_FACTOR, 256*ARCH_STACK_FACTOR, 512*ARCH_STACK_FACTOR};
|
||||
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
|
||||
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
|
||||
};
|
||||
if (stackSizeClass<epicsThreadStackSmall) {
|
||||
errlogPrintf("epicsThreadGetStackSize illegal argument (too small)");
|
||||
return stackSizeTable[epicsThreadStackBig];
|
||||
|
||||
Reference in New Issue
Block a user