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