Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

pci_detach()

Disconnect from the PCI server

Synopsis:

#include <hw/pci.h>

int pci_detach( unsigned handle );

Arguments:

handle
The value returned by a successful call to pci_attach().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

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.


Note: Don't call any of the other pci_*() functions after calling pci_detach() (unless you've reattached with pci_attach()).

Returns:

PCI_SUCCESS.

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pci_attach(), pci_attach_device(), pci_detach_device(), pci_find_class(), pci_find_device(), pci_present(), pci_read_config(), pci_read_config8(), pci_read_config16(), pci_read_config32(), pci_rescan_bus(), pci_write_config(), pci_write_config8(), pci_write_config16(), pci_write_config32()


[Previous] [Contents] [Index] [Next]