tail head cat sleep
QR code linking to this page

manページ  — BUS_READ_IVAR

名称

BUS_READ_IVAR, BUS_WRITE_IVAR – バス特有のデバイスインスタンス変数の操作

内容

書式

#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);

解説

これらの 2 つのメソッドは子デバイスのバス特有のインスタンス変数の組 を管理します。 その意図は、異なった型のバスはそれぞれが適当なインスタンス変数 の組(ISA バスにおける port や irq という具合に)を定義するということです。

この情報は構造体として子デバイスに与えられることも出来ましたが、 そうすると、全てのドライバを編集し再コンパイルするという作業なしには、 バスが変数を追加したり削除したりすることは困難になります。 この作業はベンダが供給するバイナリのドライバでは不可能かもしれません。

戻り値

成功時には 0 が返され、それ以外の場合は適切なエラーが返されます。

関連項目

device(9), driver(9)

作者

このマニュアルページは Doug Rabson が書きました。

BUS_READ_IVAR (9) June 16, 1998

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options!
— The Unix Haters' handbook