Back to Darwin Xnu

Device Close

osfmk/man/device_close.html

latest810 B
Original Source

device_close


Function - De-establish a connection to a device.

SYNOPSIS

**#include&lt device/device.h&gt**** kern\_return\_t device\_close****(mach\_port\_t**device**);**

PARAMETERS

device[in device send right] A device port to the device to be closed.

DESCRIPTION

The device_close function destroys the associated device port. The open count for the named device is decremented. If this count reaches zero, the close operation of the device driver is invoked, closing the device.

NOTES

device_close will destroy any mapped device windows obtained through this device port.

RETURN VALUES

D_NO_SUCH_DEVICE No device with that name, or the device is not operational.

Functions: device_open.