Subject: Re: Possible change to pci_intr_map API.
To: None <sommerfeld@netbsd.org,tech-kern@netbsd.org>
From: Ben Harris <bjh21@cam.ac.uk>
List: tech-kern
Date: 12/07/2000 17:50:16
In article <20001207170949.952672A39@orchard.arlington.ma.us> you write:
>> This sounds reasonable to me. Note that I would probably avoid the
>> pci_attach_args_t thing, and just continue to call it "struct pci_attach_args".
>
>"mixed coding style considered annoying".
>
>[if we want to encourage use of both "struct foo" and "bar_t" types
>within a single API, we need to write down the rationale for when to
>use one vs. the other].
I think a reasonable one (which may or may not apply here) is that struct
foo is transparent (i.e. drivers manipulating one are expected to meddle
with its innards) and bar_t is opaque (only certain code (probably MD) is
meant to look inside it). Also, bar_ts are usually things which can change
internal structure on different architectures, while structs usually stay
the same.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>