BUS_READ_IVAR(9freebsd)

BUS_READ_IVAR9freebsd

Manipulate bus-specific device instance variables

Usage

#include <sys/param.h>

#include <sys/bus.h>

int

BUS_READ_IVAR(device_t dev, device_t child, int index, uintptr_t *result);

int

BUS_WRITE_IVAR(device_t dev, device_t child, int index, uintptr_t value);

Overview

These two methods manage a bus specific set of instance variables of a child device. The intention is that each different type of bus defines a set of appropriate instance variables (such as ports and irqs for ISA bus etc.)

This information could be given to the child device as a struct but that makes it hard for a bus to add or remove variables without forcing an edit and recompile for all drivers which may not be possible for vendor supplied binary drivers.

Return values

Zero is returned on success, otherwise an appropriate error is returned.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Doug Rabson.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.