On Fri, May 15, 2009 at 10:58, adam radford <aradford@xxxxxxxxx> wrote:On Wed, May 13, 2009 at 9:16 PM, Jeff Garzik <jeff@xxxxxxxxxx> wrote:Taking drivers/net/e1000e as an82571.c contains Linux specific code such as: including Linux
example,
hw.h hardware-specific defines, ~cross-OS
82571.c code specific to 8257x chip family, ~cross-OS
specific header files, calls to msleep().
ich8lan.c code specific to ICH8+ chip family, ~cross-OSich8lan.c contains Linux specific code such as: might_sleep(),
mutex_trylock(), mutex_unlock(), udelay(), msleep(), writel(), readl().
Perhaps this is a bad example? It seems like the "common layer"
sections that are "cross-OS" shouldn't contain any Linux specific code at all.
I think the implication is that the cross-OS parts are coded, as it
happens, in the linux coding style, using linux functions, but then a
Windows layer maps these to Windows specific functions.