pci_device_detach()
QNX SDP8.0PCI Server User's GuideAPIConfiguration
Detach a device
Synopsis:
#include <pci/pci.h>
pci_err_t pci_device_detach( pci_devhdl_t hdl );
Arguments:
- hdl
 - The handle of the device, obtained by calling pci_device_attach().
 
Library:
libpci
Use the -l pci option to qcc to link against this library.
Description:
When the device is no longer in use, or the attaching software will no longer manage the device, you should call pci_device_detach() to return all resources to the system. If any capabilities have been enabled, you should first disable them and free the pci_cap_t that pci_device_read_cap() returned.
Returns:
- PCI_ERR_OK
 - Success.
 - PCI_ERR_EINVAL
 - The hdl argument is invalid or doesn't refer to a device that you attached to.
 - PCI_ERR_ENODEV
 - The hdl argument doesn't refer to a valid device.
 - PCI_ERR_ENOENT
 - An internal error occurred; there's no recorded attachment for you.
 
Classification:
| Safety: | |
|---|---|
| Cancellation point | No | 
| Signal handler | No | 
| Thread | Yes | 
See also:
Page updated: 
