BUS_READ_IVAR(9)
π BUS_READ_IVAR(9) π
okay bestie, welcome to the Kernel Developer's Manual β this page is all about BUS_READ_IVAR(9) and BUS_WRITE_IVAR(9), the two methods for handling bus-specific device instance variables β¨
π NAME π
BUS_READ_IVAR, BUS_WRITE_IVAR β manipulate bus-specific device instance variables, periodt π
β¨ SYNOPSIS β¨
First, include these, no cap:
#include <sys/param.h>
#include <sys/bus.h>
Then the function signatures, literally:
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);
π DESCRIPTION π
These two methods manage a bus specific set of instance variables of a child device, and that's the whole vibe π«Ά
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. β because every bus has its own little personality, iykyk.
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 π. So yeah, these methods are the move.
β RETURN VALUES β
Zero is returned on success. Otherwise, an appropriate error is returned. That's it, bestie π
π¦ SEE ALSO π¦
πΈ AUTHORS πΈ
This manual page was written by Doug Rabson. iconic behavior, honestly π
okay that's the whole page! made with π β source/version: Debian, date: June 16, 1998. bye bestie, go read some ivars πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1998 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms