Re: [newbie] timer in module

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 18 May 2001 14:53:15 +0100 (BST)


> > Your timer is like an interrupt (in fact it runs from one) so you will
> need
> > to lock it against transmit, receive, multicast list loads and get_stats
> > all of which can happen at the same time.
>
> So I must disable interrupt when I handle another function like receive
> etc ...

That depends on the nature of your hardware. Well designed hardware keeps
the various functional modules apart. On older or poorly designed hardware
that may not be the case - eg ythe old NE2000 cards have register windows
and the various code paths lock the chip so that somebody does not change
register window on someone else.

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