From f5bc02393eea783c1d688f23aa88a6b32e098d68 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Thu, 2 Feb 2012 18:14:01 -0600
Subject: [PATCH] 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
---
documentation/RELEASE_NOTES.html | 3 +++
src/libCom/osi/os/WIN32/osdThread.c | 5 ++++-
src/libCom/osi/os/posix/osdThread.c | 9 ++++-----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 93d3045c8..14203fb03 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -23,6 +23,9 @@ fixed in this release:
reading only 1st char of link in "long string" ($) syntax fails in read
error
+903448
+
+ RHEL5 nss ldap update cause stack size related failure
Comments in iocsh scripts
diff --git a/src/libCom/osi/os/WIN32/osdThread.c b/src/libCom/osi/os/WIN32/osdThread.c
index c880fbd1a..86f7b7df7 100644
--- a/src/libCom/osi/os/WIN32/osdThread.c
+++ b/src/libCom/osi/os/WIN32/osdThread.c
@@ -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