[PATCH 09/12] rename vme pointer table

This commit is contained in:
Michael Davidsaver
2010-05-25 13:58:50 +01:00
committed by Michael Davidsaver
parent 000c98dbaa
commit 50bcef9c63
6 changed files with 30 additions and 30 deletions
+20 -20
View File
@@ -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);
}
+4 -4
View File
@@ -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
}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -12,4 +12,4 @@
#define epicsExportSharedSymbols
#include "devLibVME.h"
epicsShareDef devLibVirtualOS *pdevLibVirtualOS = NULL;
epicsShareDef devLibVME *pdevLibVME = NULL;
+1 -1
View File
@@ -14,4 +14,4 @@
/* This file must contain no definitions other than the following: */
devLibVirtualOS *pdevLibVirtualOS;
devLibVME *pdevLibVME;
+2 -2
View File
@@ -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