Subject: Re: windows drivers on netbsd?
To: Perry E.Metzger <perry@piermont.com>
From: Krister Walfridsson <cato@df.lth.se>
List: port-i386
Date: 11/07/2003 17:40:13
On Fri, 7 Nov 2003, Perry E.Metzger wrote:
> The good thing about the Windows driver interfaces is that, unlike
> most of Windows, they are actually totally documented. They need to
> be, because Microsoft relies on vendors to write them.
Start to write Windows drivers, and you'll notice that the documentation
leave a lot to the imagination... Many important details can only be
learned from closely examining the example source code in the Windows
DDK (but you need to be careful, since the example source is quite
buggy...)
Many important drivers (for example the win-modem driver) use
undocumented functions. Some drivers use knowledge about what
is stored in opaque data fields in various structures.
One other fun thing with windows drivers is that the kernel have
preemptive threading, and most(?) drivers use threads. The threads
have different priorities, and a low priority kernel mode thread
has lower priority than some user-level stuff, so it is OK (FSVO
OK) to due busy-wait in a low prio kernel mode thread. That will
be fun to implement in a compatibility layer within the NetBSD
kernel! ;)
/Krister