EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: EPICS task watch dog
From: "Szalata, Zenon M." <[email protected]>
To: "Williams Jr., Ernest L." <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Sat, 30 Apr 2011 21:08:03 -0700

I am working to upgrade an old device driver module so it can be used with EPICS R3.14.11 and vxWorks 6.6.  It is currently used with EPICS R3.13.2 and some older version of vxWorks.  The author is using the task watchdog routines in a way that I find confusing and am not able to make a decision on how to proceed.

 

The task watchdog routines in EPICS R3.13.2 take int argument. An example is void taskwdRemove(int tid).

In EPICS R3.14.11 this routine is now epicsShareFunc void taskwdRemove(epicsThreadId tid).

The argument is now is a pointer to a structure.  In itself, that is not surprising.  The confusing part is that the author is using vxWorks routines, which use an int type handle and the EPICS routines which are called with the vxWorks handles.  Here is a code fragment:

 

int tid;

 

if ( (tid = taskNameToId( NAME )) != ERROR )

    {

    taskwdRemove( tid );

    taskDelete( tid );

    }

 

Compiler does not like this because an int type is passed where a pointer to a structure is expected.

Type casting the argument to the correct type would please the compiler, but I fail to see how this could possibly work correctly.

 

Part of my problem is that I started to work with EPICS with R3.14.9, so R3.13.2 seems prehistoric

 

Someone might ask a legitimate question, why bother with this old code?  In fact I have a new device driver, which works with new applications.  Unfortunately, the “old” IOC, which is using the driver in question is using a fairly extensive set of records and these would have to be modified substantially to make the IOC work with a new device driver code.  So, I think that upgrading the device driver and preserving the .db files is more likely to result in the upgraded IOC working as it did before.

 

Any ideas are most welcome,

Zen


Replies:
Re: EPICS task watch dog Till Straumann

Navigate by Date:
Prev: RE: Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang
Next: Re: EPICS task watch dog Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: regarding CaChannel v1.6 handling of dynamic subarrays Andrew Johnson
Next: Re: EPICS task watch dog Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·