Skip to content
Snippets Groups Projects
Commit bb67b4e3 authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

Removing the now unused findRfmCard() function

parent 50a7ba68
No related branches found
No related tags found
2 merge requests!439RCG 5.0 release fro deb 10,!295Shared memory cleanup 1
......@@ -60,34 +60,6 @@ findSharedMemory(char *sys_name)
return addr;
}
/// Find and return pointer to shared memory. This is old, from when EPICS memory was on
/// VMIC RFM cards.
/// This function should be deleted in favor just having findSharedMemory return pointer,
/// but need to find/change all code that calls this function first.
/// Note that this routine does nothing but return addr, which was found in findSharedMemory().
/// @param[in] bn RFM board number (0,1) - should now always be zero
/// @return Pointer to start of shared memory segment for this system.
void *
findRfmCard(unsigned int bn)
{
if (!addr) {
int fd;
if ((fd=open("/rtl_epics", O_RDWR))<0) {
perror("open(\"rtl_epics\")");
_exit(-1);
}
addr = (volatile unsigned char *)mmap(0, 64*1024*1024-5000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (addr == MAP_FAILED) {
printf("return was %d\n",errno);
perror("mmap");
_exit(-1);
}
printf("mmapped address is 0x%lx\n", (long)addr);
}
return (void *)addr;
}
volatile void *
findSharedMemorySize(char *sys_name, int size)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment