xref: /freebsd/share/man/man9/device_get_ivars.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1cefd51ecSDoug Rabson.\" -*- nroff -*-
2cefd51ecSDoug Rabson.\"
3cefd51ecSDoug Rabson.\" Copyright (c) 1998 Doug Rabson
4cefd51ecSDoug Rabson.\"
5cefd51ecSDoug Rabson.\" All rights reserved.
6cefd51ecSDoug Rabson.\"
7cefd51ecSDoug Rabson.\" This program is free software.
8cefd51ecSDoug Rabson.\"
9cefd51ecSDoug Rabson.\" Redistribution and use in source and binary forms, with or without
10cefd51ecSDoug Rabson.\" modification, are permitted provided that the following conditions
11cefd51ecSDoug Rabson.\" are met:
12cefd51ecSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
13cefd51ecSDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
14cefd51ecSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
15cefd51ecSDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
16cefd51ecSDoug Rabson.\"    documentation and/or other materials provided with the distribution.
17cefd51ecSDoug Rabson.\"
18cefd51ecSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19cefd51ecSDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20cefd51ecSDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21cefd51ecSDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22cefd51ecSDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23cefd51ecSDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24cefd51ecSDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25cefd51ecSDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26cefd51ecSDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27cefd51ecSDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28cefd51ecSDoug Rabson.\"
29cefd51ecSDoug Rabson.Dd June 16, 1998
30def37e7cSMike Pritchard.Dt DEVICE_GET_IVARS 9
313d45e180SRuslan Ermilov.Os
32cefd51ecSDoug Rabson.Sh NAME
33c56c6babSWarner Losh.Nm device_get_ivars ,
34c56c6babSWarner Losh.Nm device_set_ivars
35cefd51ecSDoug Rabson.Nd access bus private variables
36cefd51ecSDoug Rabson.Sh SYNOPSIS
3732eef9aeSRuslan Ermilov.In sys/param.h
3832eef9aeSRuslan Ermilov.In sys/bus.h
39c8185672SRuslan Ermilov.Ft "void *"
40cefd51ecSDoug Rabson.Fn device_get_ivars "device_t dev"
41c56c6babSWarner Losh.Ft void
42c8185672SRuslan Ermilov.Fn device_set_ivars "device_t dev" "void *ivar"
43cefd51ecSDoug Rabson.Sh DESCRIPTION
44c56c6babSWarner LoshThe
45c8185672SRuslan Ermilov.Fn device_get_ivars
46c56c6babSWarner Loshfunction returns the bus-specific instance variables of a device.
47c56c6babSWarner Losh.Pp
48c56c6babSWarner LoshThe
49c8185672SRuslan Ermilov.Fn device_set_ivars
50c56c6babSWarner Loshfunction sets the bus-specific instance variables of a device.
51c56c6babSWarner Losh.Pp
52c56c6babSWarner LoshTypically, only bus drivers will use these functions.
53c56c6babSWarner LoshThe kernel assumes that the bus driver will manage this memory, and no
54c56c6babSWarner Loshautomatic memory allocation or deallocation happens.
55c56c6babSWarner LoshClient drivers should access ivars through the
56c56c6babSWarner Losh.Xr BUS_READ_IVAR 9
57c56c6babSWarner Loshinterface instead.
58cefd51ecSDoug Rabson.Sh SEE ALSO
59cefd51ecSDoug Rabson.Xr device 9
60cefd51ecSDoug Rabson.Sh AUTHORS
6109356c84SHiten PandyaThis manual page was written by
62cefd51ecSDoug Rabson.An Doug Rabson .
63