diff --git a/src/libCom/osi/os/vxWorks/devLibOSD.c b/src/libCom/osi/os/vxWorks/devLibOSD.c index 62644a837..5326bd883 100644 --- a/src/libCom/osi/os/vxWorks/devLibOSD.c +++ b/src/libCom/osi/os/vxWorks/devLibOSD.c @@ -32,6 +32,9 @@ #include "epicsFindSymbol.h" #include "devLib.h" +typedef void myISR (void *pParam); + +#if CPU_FAMILY != PPC /* * A list of the names of the unexpected interrupt handlers * ( some of these are provided by wrs ) @@ -41,8 +44,8 @@ LOCAL char *defaultHandlerNames[] = { "excIntStub", "unsolicitedHandlerEPICS"}; -typedef void myISR (void *pParam); LOCAL myISR *defaultHandlerAddr[NELEMENTS(defaultHandlerNames)]; +#endif LOCAL myISR *isrFetch(unsigned vectorNumber); @@ -74,7 +77,9 @@ int EPICStovxWorksAddrType[] EPICSAddrTypeNoConvert }; +#if CPU_FAMILY != PPC LOCAL void initHandlerAddrList(void); +#endif /* * maps logical address to physical address, but does not detect @@ -399,6 +404,7 @@ void unsolicitedHandlerEPICS(int vectorNumber) 0); } +#if CPU_FAMILY != PPC /* * * initHandlerAddrList() @@ -422,6 +428,7 @@ void initHandlerAddrList(void) } } } +#endif /****************************************************************************** * diff --git a/src/libCom/osi/os/vxWorks/osdThread.c b/src/libCom/osi/os/vxWorks/osdThread.c index cdfb8a7d8..395b25095 100644 --- a/src/libCom/osi/os/vxWorks/osdThread.c +++ b/src/libCom/osi/os/vxWorks/osdThread.c @@ -40,9 +40,12 @@ static const unsigned stackSizeTable[epicsThreadStackBig+1] = {4000*ARCH_STACK_FACTOR, 6000*ARCH_STACK_FACTOR, 11000*ARCH_STACK_FACTOR}; -/*The following is just to force atReboot to be loaded*/ +/*The following forces atReboot to be loaded*/ extern int atRebootExtern; -static int *patRebootExtern = &atRebootExtern; +static struct pext { + int *pExtern; + struct pext *pext; +} pext = {&atRebootExtern, &pext}; /* definitions for implementation of epicsThreadPrivate */ static void **papTSD = 0; @@ -361,19 +364,6 @@ void *epicsThreadPrivateGet(epicsThreadPrivateId id) return(data); } -/* Tornado compilers for 68k have an optimizer bug at -O1 and above; the - * code generated for epicsThreadSleepQuantum() is incorrect. This routine - * tests for that bug. This routine must appear above the code it calls or - * or the optimizer may inline epicsThreadSleepQuantum() */ -int vxWorksBrokenCompilerTest() -{ - double q = epicsThreadSleepQuantum(); - double one = q * sysClkRateGet(); - int ok = (one > 0.999) && (one < 1.001); - printf("%s: epicsThreadSleepQuantum() = %f\n", ok ? "Ok" : "BROKEN", q); - return ok; -} - double epicsThreadSleepQuantum () { double HZ = sysClkRateGet ();