Re: NT DDK vs. Linux DDI, a practical comparison [long]

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 20 Sep 1998 19:53:07 +0100


On Sat, Sep 19, 1998 at 10:43:12PM -0700, Stephen Williams wrote:
> There is no "printk" under NT. There is the event logger, which is fine as
> far as it goes, but after a while you start having nightmares in UNICODE;
> so I wrote a printk replacement whose outputs can be read from a virtual
> device, and this is my best debugging tool. It turns out that there is
> a tool to display DbgPrint messages, but that function is compiled out
> in the "free" (meaning optimized) build.

printk is a wonderful tool. So wonderful, when I was writing DJGPP
networking code, I had to write a printk-equivalent. I know how useful
that is now: #1 debugging tool = some way to get messages out!

Bottom halves are also pretty neat, so I wrote them for DJGPP too (very
similar to DJGPP's own signal emulation) and used one to get the printks
in irq handlers into the log file safely.

> NT will provide for you mapped and locked pages of the process buffer for
> reads and writes. This allows one to DMA directly into the process buffer
> if you write the driver (and device) to support it. You get a Mdl, which
> you are supposed to pass to the DMA handling code. It is not clear how this
> works for PCI devices, but I haven't put much effort into it. Some Linux
> driver writers have been pining for such a capability.

Some Linux driver writers have been using it already, hacked per-driver
(e.g. sound, special network stuff) except for the locking. User page
locking and blocking for device use would be rather nice.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/