Disconnect from the PCI server
#include <hw/pci.h> int pci_detach( unsigned handle );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pci_detach() function disconnects from the PCI server. Any resources allocated with pci_attach_device() are released.
The pci_attach() function opens a file descriptor against the PCI server, and all of the low-level library calls to the PCI server use this fd. When you call pci_detach(), the low-level code does a close() on the file descriptor, which tells the PCI server to clean up any allocations associated with it.
PCI_SUCCESS.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |