Subject: Re: sharing drivers (was re: m68k comman...)
To: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
From: John F. Woods <jfw@FunHouse.com>
List: current-users
Date: 03/23/1996 10:50:42
> Using a single driver (shared between architectures or not) for
> multiple access methods on a single machine at the same time is a lot
> harder.  I've yet to see an example that actually _does_ it, probably
> because it's relatively hard to do in a reasonable way.

Look at Windows NT (bring a barf bag).  They use the runtime-test approach --
they have to, they want to ship one single driver and have it do the right
thing, regardless of machine configuration (regardless of whether your machine
was even *designed* when the driver was written).  It's probably slower, but
from all appearances, it delivers exactly what they promise (a first for MS),
drivers that *do* the right thing independant of machine configuration.
(Assuming your driver follows the rules, which not all actually do.)

Using function pointers to paper over the differences might be faster than
explicit runtime tests.  (On the other hand, I suppose it might also be
slower, depending on the system...)