From 50bcef9c634bf7fe6cd68875afc8ad0a08871372 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 25 May 2010 13:58:50 +0100 Subject: [PATCH] [PATCH 09/12] rename vme pointer table --- src/libCom/osi/devLibVME.c | 40 +++++++++++------------ src/libCom/osi/devLibVMEImpl.h | 8 ++--- src/libCom/osi/os/RTEMS/devLibVMEOSD.c | 4 +-- src/libCom/osi/os/cygwin32/devLibVMEOSD.c | 2 +- src/libCom/osi/os/default/devLibVMEOSD.c | 2 +- src/libCom/osi/os/vxWorks/devLibVMEOSD.c | 4 +-- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/libCom/osi/devLibVME.c b/src/libCom/osi/devLibVME.c index 53f55dd99..7d5c9981a 100644 --- a/src/libCom/osi/devLibVME.c +++ b/src/libCom/osi/devLibVME.c @@ -170,7 +170,7 @@ long devBusToLocalAddr( /* * Call the virtual os routine to map the bus address to a CPU address */ - status = (*pdevLibVirtualOS->pDevMapAddr) (addrType, 0, busAddr, 4, &localAddress); + status = (*pdevLibVME->pDevMapAddr) (addrType, 0, busAddr, 4, &localAddress); if (status) { errPrintf (status, __FILE__, __LINE__, "%s bus address =0X%X\n", epicsAddressTypeName[addrType], (unsigned int)busAddr); @@ -278,7 +278,7 @@ long devReadProbe (unsigned wordSize, volatile const void *ptr, void *pValue) } } - return (*pdevLibVirtualOS->pDevReadProbe) (wordSize, ptr, pValue); + return (*pdevLibVME->pDevReadProbe) (wordSize, ptr, pValue); } /* @@ -298,7 +298,7 @@ long devWriteProbe (unsigned wordSize, volatile void *ptr, const void *pValue) } } - return (*pdevLibVirtualOS->pDevWriteProbe) (wordSize, ptr, pValue); + return (*pdevLibVME->pDevWriteProbe) (wordSize, ptr, pValue); } /* @@ -335,7 +335,7 @@ static long devInstallAddr ( * always map through the virtual os in case the memory * management is set up there */ - status = (*pdevLibVirtualOS->pDevMapAddr) (addrType, 0, base, + status = (*pdevLibVME->pDevMapAddr) (addrType, 0, base, size, &pPhysicalAddress); if (status) { errPrintf (status, __FILE__, __LINE__, "%s base=0X%X size = 0X%X", @@ -700,8 +700,8 @@ static long devLibInit (void) if(devLibInitFlag) return(SUCCESS); - if(!pdevLibVirtualOS) { - epicsPrintf ("pdevLibVirtualOS is NULL\n"); + if(!pdevLibVME) { + epicsPrintf ("pdevLibVME is NULL\n"); return S_dev_internal; } @@ -730,7 +730,7 @@ static long devLibInit (void) } epicsMutexUnlock(addrListLock); devLibInitFlag = TRUE; - return pdevLibVirtualOS->pDevInit(); + return pdevLibVME->pDevInit(); } /* @@ -892,7 +892,7 @@ long devNoResponseProbe (epicsAddressType addrType, * every byte in the block must * map to a physical address */ - s = (*pdevLibVirtualOS->pDevMapAddr) (addrType, 0, probe, wordSize, &pPhysical); + s = (*pdevLibVME->pDevMapAddr) (addrType, 0, probe, wordSize, &pPhysical); if (s!=SUCCESS) { return s; } @@ -900,7 +900,7 @@ long devNoResponseProbe (epicsAddressType addrType, /* * verify that no device is present */ - s = (*pdevLibVirtualOS->pDevReadProbe)(wordSize, pPhysical, &allWordSizes); + s = (*pdevLibVME->pDevReadProbe)(wordSize, pPhysical, &allWordSizes); if (s==SUCCESS) { return S_dev_addressOverlap; } @@ -924,7 +924,7 @@ void *parameter ) } } - return (*pdevLibVirtualOS->pDevConnectInterruptVME) (vectorNumber, + return (*pdevLibVME->pDevConnectInterruptVME) (vectorNumber, pFunction, parameter); } @@ -941,7 +941,7 @@ void (*pFunction)(void *) ) } } - return (*pdevLibVirtualOS->pDevDisconnectInterruptVME) (vectorNumber, pFunction); + return (*pdevLibVME->pDevDisconnectInterruptVME) (vectorNumber, pFunction); } int devInterruptInUseVME (unsigned level) @@ -955,7 +955,7 @@ int devInterruptInUseVME (unsigned level) } } - return (*pdevLibVirtualOS->pDevInterruptInUseVME) (level); + return (*pdevLibVME->pDevInterruptInUseVME) (level); } long devEnableInterruptLevelVME (unsigned level) @@ -969,7 +969,7 @@ long devEnableInterruptLevelVME (unsigned level) } } - return (*pdevLibVirtualOS->pDevEnableInterruptLevelVME) (level); + return (*pdevLibVME->pDevEnableInterruptLevelVME) (level); } long devDisableInterruptLevelVME (unsigned level) @@ -983,7 +983,7 @@ long devDisableInterruptLevelVME (unsigned level) } } - return (*pdevLibVirtualOS->pDevDisableInterruptLevelVME) (level); + return (*pdevLibVME->pDevDisableInterruptLevelVME) (level); } /* @@ -1009,7 +1009,7 @@ void *parameter) switch(intType){ case intVME: case intVXI: - return (*pdevLibVirtualOS->pDevConnectInterruptVME) (vectorNumber, + return (*pdevLibVME->pDevConnectInterruptVME) (vectorNumber, pFunction, parameter); default: return S_dev_uknIntType; @@ -1040,7 +1040,7 @@ void (*pFunction)(void *) switch(intType){ case intVME: case intVXI: - return (*pdevLibVirtualOS->pDevDisconnectInterruptVME) (vectorNumber, + return (*pdevLibVME->pDevDisconnectInterruptVME) (vectorNumber, pFunction); default: return S_dev_uknIntType; @@ -1068,7 +1068,7 @@ unsigned level) switch(intType){ case intVME: case intVXI: - return (*pdevLibVirtualOS->pDevEnableInterruptLevelVME) (level); + return (*pdevLibVME->pDevEnableInterruptLevelVME) (level); default: return S_dev_uknIntType; } @@ -1095,7 +1095,7 @@ unsigned level) switch(intType){ case intVME: case intVXI: - return (*pdevLibVirtualOS->pDevDisableInterruptLevelVME) (level); + return (*pdevLibVME->pDevDisableInterruptLevelVME) (level); default: return S_dev_uknIntType; } @@ -1144,7 +1144,7 @@ void *devLibA24Malloc(size_t size) if (devLibA24Debug) epicsPrintf ("devLibA24Malloc(%u) entered\n", (unsigned int)size); - ret = pdevLibVirtualOS->pDevA24Malloc(size); + ret = pdevLibVME->pDevA24Malloc(size); return(ret); } @@ -1153,5 +1153,5 @@ void devLibA24Free(void *pBlock) if (devLibA24Debug) epicsPrintf("devLibA24Free(%p) entered\n", pBlock); - pdevLibVirtualOS->pDevA24Free(pBlock); + pdevLibVME->pDevA24Free(pBlock); } diff --git a/src/libCom/osi/devLibVMEImpl.h b/src/libCom/osi/devLibVMEImpl.h index 775bc3b42..b75aa1ba9 100644 --- a/src/libCom/osi/devLibVMEImpl.h +++ b/src/libCom/osi/devLibVMEImpl.h @@ -29,12 +29,12 @@ extern "C" { /* * virtual OS layer for devLib.c * - * The global virtual OS table pdevLibVirtualOS controls + * The global virtual OS table pdevLibVME controls * the behaviour of the functions defined in devLib.h. * All of which call into the functions found in this table * to perform system specific tasks. */ -typedef struct devLibVirtualOS { +typedef struct devLibVME { /* * maps logical address to physical address, but does not detect * two device drivers that are using the same address range @@ -86,9 +86,9 @@ typedef struct devLibVirtualOS { * test if VME interrupt has an ISR connected */ int (*pDevInterruptInUseVME) (unsigned vectorNumber); -}devLibVirtualOS; +}devLibVME; -epicsShareExtern devLibVirtualOS *pdevLibVirtualOS; +epicsShareExtern devLibVME *pdevLibVME; #ifdef __cplusplus } diff --git a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c index 20b81bc3a..44ebb3adf 100644 --- a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c +++ b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c @@ -113,13 +113,13 @@ static long rtmsDevInit(void); /* * used by bind in devLib.c */ -static devLibVirtualOS rtemsVirtualOS = { +static devLibVME rtemsVirtualOS = { rtmsDevMapAddr, rtmsDevReadProbe, rtmsDevWriteProbe, rtmsDevConnectInterruptVME, rtmsDevDisconnectInterruptVME, rtmsDevEnableInterruptLevelVME, rtmsDevDisableInterruptLevelVME, devA24Malloc,devA24Free,rtmsDevInit,rtemsDevInterruptInUseVME }; -devLibVirtualOS *pdevLibVirtualOS = &rtemsVirtualOS; +devLibVME *pdevLibVME = &rtemsVirtualOS; /* RTEMS specific initialization */ static long diff --git a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c index 9192eac8b..3058292a5 100644 --- a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c +++ b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c @@ -12,4 +12,4 @@ #define epicsExportSharedSymbols #include "devLibVME.h" -epicsShareDef devLibVirtualOS *pdevLibVirtualOS = NULL; +epicsShareDef devLibVME *pdevLibVME = NULL; diff --git a/src/libCom/osi/os/default/devLibVMEOSD.c b/src/libCom/osi/os/default/devLibVMEOSD.c index e373325a8..0ae3e56cf 100644 --- a/src/libCom/osi/os/default/devLibVMEOSD.c +++ b/src/libCom/osi/os/default/devLibVMEOSD.c @@ -14,4 +14,4 @@ /* This file must contain no definitions other than the following: */ -devLibVirtualOS *pdevLibVirtualOS; +devLibVME *pdevLibVME; diff --git a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c index 7ce0ce663..525678419 100644 --- a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c +++ b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c @@ -133,13 +133,13 @@ static int vxDevInterruptInUseVME (unsigned vectorNumber); /* * used by dynamic bind in devLib.c */ -static devLibVirtualOS vxVirtualOS = { +static devLibVME vxVirtualOS = { vxDevMapAddr, vxDevReadProbe, vxDevWriteProbe, vxDevConnectInterruptVME, vxDevDisconnectInterruptVME, vxDevEnableInterruptLevelVME, vxDevDisableInterruptLevelVME, devA24Malloc,devA24Free,devInit,vxDevInterruptInUseVME }; -devLibVirtualOS *pdevLibVirtualOS = &vxVirtualOS; +devLibVME *pdevLibVME = &vxVirtualOS; /* * devConnectInterruptVME