]>
Commit | Line | Data |
---|---|---|
13fec989 A |
1 | <h2>device_close</h2> |
2 | <hr> | |
3 | <p> | |
4 | <strong>Function</strong> - De-establish a connection to a device. | |
5 | <h3>SYNOPSIS</h3> | |
6 | <pre> | |
7 | <strong>#include< device/device.h></strong> | |
8 | ||
9 | <strong>kern_return_t device_close</strong> | |
10 | <strong>(mach_port_t</strong> <var>device</var><strong>);</strong> | |
11 | </pre> | |
12 | <h3>PARAMETERS</h3> | |
13 | <dl> | |
14 | <p> | |
15 | <dt> <var>device</var> | |
16 | <dd> | |
17 | [in device send right] | |
18 | A device port to the device to be closed. | |
19 | </dl> | |
20 | <h3>DESCRIPTION</h3> | |
21 | <p> | |
22 | The <strong>device_close</strong> function destroys the associated device | |
23 | port. The open count | |
24 | for the named device is decremented. If this count reaches zero, the close | |
25 | operation of the device driver is invoked, closing the device. | |
26 | <h3>NOTES</h3> | |
27 | <p> | |
28 | <strong>device_close</strong> will destroy any mapped device windows | |
29 | obtained through this | |
30 | device port. | |
31 | <h3>RETURN VALUES</h3> | |
32 | <dl> | |
33 | <p> | |
34 | <dt> <strong>D_NO_SUCH_DEVICE</strong> | |
35 | <dd> | |
36 | No device with that name, or the device is not operational. | |
37 | </dl> | |
38 | <h3>RELATED INFORMATION</h3> | |
39 | <p> | |
40 | Functions: | |
41 | <a href="device_open.html"><strong>device_open</strong></a>. |