Hi Andrew,
Yes, it's clear that using
epicsThreadGetStackSize(epicsThreadStackBig) is much more universal than
pure constants as 10000 or 132096.
Small constant can cause warning (like we at DESY had before in our
SL2.6/R3.14.7.2, when we used stackSize=10000) or even error (like you
wrote).
Thank you for advice!
I've already re-compile, test and add this your changing in our
DESY devSNMP download page
(http://www-mks2.desy.de/content/e4/e40/e41/e12212/)
Best regards,
Albert
>-----Original Message-----
>From: Andrew Johnson [mailto:[email protected]]
>Sent: Tuesday, November 14, 2006 4:58 PM
>To: Kagarmanov, Albert
>Cc: Bertrand H.J. Biritz; [email protected]
>Subject: Re: devSNMP: Thread error?
>
>
>Albert,
>
>Kagarmanov, Albert wrote:
>> This is not a real error, it's warning from
>pthread_attr_setstacksize
>> system-call, which invoked in devSnmp.c in function
>> int epicsSnmpInit(int param)
>
>Actually it is an error, in the epicsSnmpInit() code.
>
>> It looks like 10000 stack-size is small enough for your Linux (See
>> http://docs.sun.com/app/docs/doc/816-5137/6mba5vpja?a=view
>for detail)
>>
>> We've changed this size till 128K as it recommended in
>> $EPICS/base/documentation/RELEASE_NOTES.html and don't have this
>> warning. See our http://www-mks2.desy.de/content/e4/e40/e41/e12212/
>> for detail.
>
>The stackSize parameter to the epicsThreadCreate() call should
>not be a
>number as the sizes needed can be different on different
>architectures.
> The epicsSnmpInit() function should be passing
>epicsThreadGetStackSize() one of three values epicsThreadStackSmall,
>epicsThreadStackMedium or epicsThreadStackBig according to how much
>stack the thread is expected to need, and using the return value from
>epicsThreadGetStackSize() as the parameter to
>epicsThreadCreate(). As an
>example, here's an excerpt from base/src/db/callback.c:
>
> callbackTaskId[ind] = epicsThreadCreate(taskName, priority,
> epicsThreadGetStackSize(epicsThreadStackBig),
> (EPICSTHREADFUNC)callbackTask, &priorityValue[ind]);
>
>By using this approach, the problem should not arise in the
>future as a
>new architecture with a bigger or smaller stack requirement that gets
>added to Base can adjust the absolute amount of memory
>allocated to the
>three sizes.
>
>My appologies if the wording in RELEASE_NOTES.html was confusing, and
>the Application Developers Guide entry for epicsThreadCreate()
>probably
>didn't help much either; I have just revised both documents.
>
>- Andrew
>--
>There is considerable overlap between the intelligence of the
>smartest bears and the dumbest tourists -- Yosemite National
>Park Ranger
>
- Replies:
- Re: devSNMP: Thread error? Bertrand H.J. Biritz
- References:
- Re: devSNMP: Thread error? Andrew Johnson
- Navigate by Date:
- Prev:
Re: Motion control failure at APS Bill Nolan
- Next:
Re: Modbus driver David Dudley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: devSNMP: Thread error? Andrew Johnson
- Next:
Re: devSNMP: Thread error? Bertrand H.J. Biritz
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|