Specifications

D
evice Driver Programming
A
-6
}
if (bar0_shm_id != NULL) {/* check if shmid valid */
shmctl(bar0_shm_id, IPC_RMID, NULL);/* yes, free it */
bar1_shm_id = NULL;
}
exit(rc);
hot_swap_only:
pci_cfg_cmd(tag, PCI_CMD_MEM, PCI_DISABLE); /* disable PCI device */
if (bar1.len) /* see */
if (pci_cfgspc_free(tag, PCI_BASE_ADDR1, &bar1) != 0) {
perror("PCIud - unable to free DIO Base address 1 ");
bar1.len = 0;
}
if (bar0.len)
if (pci_cfgspc_free(tag, PCI_BASE_ADDR0, &bar0) != 0) {
perror("PCIud - unable to free DIO Base address 0 ");
bar0.len = 0;
}
exit(rc);
}