Subject: Re: bus_space_{tag,handle}_t
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 12/28/2000 13:44:07
mouse@Rodents.Montreal.QC.CA (der Mouse) writes:
> I'm involved in a porting effort, and in dealing with the bus_space
> stuff I tried to make bus_space_tag_t and bus_space_handle_t (typedefs
> for) struct types.
>
> This fell over, because (probably among others) dev/ic/com.c assumes
> that bus_space_tag_t values can be compared with ==.  But no doco I've
> been able to find contains any indication that these types are supposed
> to be restricted in any way.
>
> Hence my question: is the com driver broken, is the doco incomplete, or
> have I just missed something?

The answer could be 'some or all of the above.'  8-)

It seems to me that comparison is probably valuable, and there should
probably be a comparison operator to enable it.

On the other hand, if they're structures of significant size, beware;
they're passed by value everywhere, so if they're expensive to pass
you'll have a lot of extra overhead for possibly very little gain.



cgd
--
Not speaking for my employer, of course.