Thanks,
I will also add a strerror to show the error.
that is
diff -r1.35.2.8 osdThread.c
148,149c148,150
< if(tid==0) {
< errlogPrintf("epicsThreadCreate taskSpawn failure for %s\n",name);
---
> if(tid==ERROR) {
> errlogPrintf("%s epicsThreadCreate taskSpawn failure %s\n",
> name,strerror(errno));
Marty
Jeff Hill wrote:
I created mantis 225, vxWorks epicsThreadCreate returns
valid (non-nill) thread id when thread wasnt created, and
assigned it to Marty.
I found this bug when regression testing CA against an
out of memory IOC.
I suggest the following patch.
Index: osdThread.c
===================================================================
RCS file:
/net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/osi/os/vxWorks/osdThread
.c,v
retrieving revision 1.35.2.8
diff -u -r1.35.2.8 osdThread.c
--- osdThread.c 17 Nov 2004 19:58:09 -0000 1.35.2.8
+++ osdThread.c 9 Nov 2005 19:33:45 -0000
@@ -145,7 +145,7 @@
VX_FP_TASK, stackSize,
(FUNCPTR)createFunction,(int)funptr,(int)parm,
0,0,0,0,0,0,0,0);
- if(tid==0) {
+ if(tid==ERROR) {
errlogPrintf("epicsThreadCreate taskSpawn failure for %s\n",name);
return(0);
}
Jeff
__________________________________________________________
Jeffrey O. Hill Mail [email protected]
LANL MS H820 Voice 505 665 1831
Los Alamos NM 87545 USA Fax 505 665 5107
- References:
- vxWorks epicsThreadCreate returns valid thread id when thread wasnt created Jeff Hill
- Navigate by Date:
- Prev:
online_notify.c Marty Kraimer
- Next:
RE: online_notify.c Jeff Hill
- Index:
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:
vxWorks epicsThreadCreate returns valid thread id when thread wasnt created Jeff Hill
- Next:
RE: vxWorks epicsThreadCreate returns valid thread id when thread wasnt created Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|