From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: sebastien.person@sycomore.fr (sebastien person)
Cc: linux-kernel@vger.kernel.org (liste noyau linux)
Subject: Re: [newbie] timer in module
Date: Fri, 18 May 2001 13:43:21 +0100 (BST) [thread overview]
Message-ID: <E150jbF-00073J-00@the-village.bc.nu> (raw)
In-Reply-To: <20010518135441.59bab0ce.sebastien.person@sycomore.fr> from "sebastien person" at May 18, 2001 01:54:41 PM
> 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.
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
next prev parent reply other threads:[~2001-05-18 12:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-18 11:54 sebastien person
2001-05-18 12:32 ` Bart Trojanowski
2001-05-18 12:43 ` Alan Cox [this message]
2001-05-18 13:28 ` sebastien person
2001-05-18 13:53 ` Alan Cox
2001-05-18 13:33 ` sebastien person
2001-05-18 13:54 ` Richard B. Johnson
2001-05-22 10:53 sebastien person
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E150jbF-00073J-00@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastien.person@sycomore.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®