Skip to content
Snippets Groups Projects
Commit 88d3797c authored by Alexander Ivanov's avatar Alexander Ivanov
Browse files

Do not start a second copy of awgtpman.

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@2670 6dcd42c9-f523-4c6d-aada-af552506706e
parent ddbb8a42
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,18 @@ CDS_HARDWARE cdsPciModules;
printf("IPC at 0x%x\n", rmBoardAddress(2));
ioMemData = (IO_MEM_DATA *)(rmBoardAddress(2) + IO_MEM_DATA_OFFSET);
// Make sure there is no other copy running already
{
int g,g1;
rmRead (0, &g, 0, 4, 0);
sleep(1);
rmRead (0, &g1, 0, 4, 0);
if (g != g1) {
fprintf(stderr, "Another copy already running! Will not start a second copy.\n");
_exit(1);
}
}
// Find the first ADC card
// Master will map ADC cards first, then DAC and finally DIO
if (ioMemData -> totalCards == 0) {
......
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