Subject: Re: "esp" driver reorg proposal
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Chris G. Demetriou <cgd@CS.cmu.edu>
List: tech-kern
Date: 01/28/1997 18:46:43
> The only one I can think of is the case where you have two different
> types of busses in the same computer. By using a function pointer, you
> test once, when you set the pointer's value. With a header-included
> solution, you have to test each time.
> 
> On the flip side, there could well be times (when you have only one
> bus type) where the header solution would be better, as you do all
> the resolution at compile time. You don't need to use a pointer to
> tell you what to do as you already know. (so actually this is a vote
> against function pointers :-)

... of course, compile time checks are useless and broken if you have
proper loadable drivers (i.e. loadable drivers that can use actual
hardware 8-).

and it's not just 'two different types of busses', it's 'two different
types of foo', where foo could be chip accesses, DMA setup, etc.


cgd