EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Bugs in 3.14.5
From: Eric Norum <[email protected]>
To: Kate Feng <[email protected]>
Cc: [email protected]
Date: Thu, 03 Jun 2004 15:39:15 -0500
Kate Feng wrote:


2) A patch is needed in RTEMS for all the 3.14.x/src/libCom/osi/os/RTEMS/epicsThread.c files mostly because a clock tick is required to support the functionality of rtems_task_wait_after().

The patch example for the 3.14.5 :
diff  epicsThread.c epicsThread.c.orig

It's a little easier to see what you are proposing if you use the diff -c or -u options to provide some context for the changes.



58c58 < static int initialized=0; ---

static int initialized;

I don't see how this makes any difference. If your static variables aren't getting initialized to 0 there must be something wrong with the board-support package startup code.



385c385 < delay = 1; ---

delay = 0;

I think that the existing behaviour matches the semantics described in the application developer's guide. Here's the code in question:
============================================================
void
epicsThreadSleep (double seconds)
{
rtems_status_code sc;
rtems_interval delay;
extern double rtemsTicksPerSecond_double;


if (seconds <= 0.0) {
delay = 0;
}
else {
delay = seconds * rtemsTicksPerSecond_double;
if (delay == 0)
delay++;
}
sc = rtems_task_wake_after (delay);
if(sc != RTEMS_SUCCESSFUL)
errlogPrintf("epicsThreadSleep: %s\n", rtems_status_text (sc));
}
=============================================================
The documentation for epicsThreadSleep says, ".... If delay is <= 0 then a delay of 0 is requested of the underlying architecture. What happens is architecture-dependent but often allows other threads of the same priority to run." This is in fact what happens on RTEMS -- rtems_task_wake_after(0) causes a "yield to other tasks at the same priority".


--
Eric Norum                                 [email protected]
Advanced Photon Source                     Phone: (630) 252-4793
Argonne National Laboratory


Replies:
Re: Bugs in 3.14.5 Kate Feng
References:
Bugs in 3.14.5 Kate Feng

Navigate by Date:
Prev: Bugs in 3.14.5 Kate Feng
Next: Re: found a bug in 3.13.9 dbLoadTemplate - after all that time Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Bugs in 3.14.5 Kate Feng
Next: Re: Bugs in 3.14.5 Kate Feng
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·