Several devLib routines don't use vector table

Bug #541331 reported by Andrew Johnson on 2007-09-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

devLib uses a vector table for most of its back-end routines to allow the bus interface routines to be external to Base and was especially designed for bus extenders such as the Struck SIS3100 PCI to VME bridge used on Linux by CLS and the Australian Synchrotron. Unfortunately this table is not used for the API routine devConnectInterruptVME() (amongst others), which makes it impossible to create a shared library containing code that calls this routine on Solaris. The devConnectInterrupt() routine can be used instead, but this is marked "deprecated" in the devLib.c file.

Internally devLib.c uses an initialized flag instead of an epicsThreadOnce object, which is not SMP-safe. This initialization is not checked for all devLib routines though.

We should probably change the way that the pdevLibVirtualOS pointer gets set and have the platform register itself and its virtual routines with devLib.

We should also provide standard routines (target-specified macros) for doing I/O operations on 8, 16 and 32-bit quantities, for platforms that don't provide memory-mapped I/O. Till Strauman has these for RTEMS...

Additional information:
Workaround: Use devConnectInterrupt(intVME, vector, isr, parm) instead of devConnectInterruptVME(vector, isr, parm).

Both vxWorks and RTEMS implement devConnectInterruptVME() in their osi/os/<os>/devLibOSD.c files and use this in the vector table. These need to be renamed to something else and a single canonical version provided in osi/devLib.c instead. The same may be true of other routines included in the same table.

Version: R3.14.10

Original Mantis Bug: mantis-301

Related branches

Andrew Johnson (anj) on 2010-03-25
Changed in epics-base:
assignee: nobody → mdavidsaver (mdavidsaver)
Changed in epics-base:
status: Confirmed → Fix Committed
Andrew Johnson (anj) on 2010-11-24
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers