lkml.org 
[lkml]   [2001]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [newbie] timer in module
Le Fri, 18 May 2001 13:43:21 +0100 (BST)
Alan Cox <alan@lxorguk.ukuu.org.uk> a ecrit :

> > I've no experience of a regularly call that let the hand to the
module.
> > My aim is to do a get data call every x seconds (x is variable).
>
> init_timer()
> add_timer()
> del_timer()
>
> are your frinnds.
>
> > In the case of a network module wich is able to send and receive data,
> > whats happen if the driver is sollicited when he received or send data
?
> > the tbusy bit is it designed to avoid this case ?
>
> 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 ...

>
> tbusy on 2.2 (its replaced on 2.4 with nicer stuff) is for write path
locking,
> and the kernel ensures your send packet routine wont be re-entered by
another
> send packet. It ensures you wont get an IRQ while handling the IRQ
>
> The rest is up to you

Thanks
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.050 / U:1.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site