From: Timur Tabi <ttabi@interactivesi.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kernel Newbies Mailing List <kernelnewbies@nl.linux.org>
Subject: in_softirq() question
Date: Wed, 17 Oct 2001 17:54:57 -0500 [thread overview]
Message-ID: <3BCE0C41.7090003@interactivesi.com> (raw)
I'm writing a module that needs to synchronize with its own tasklet (bottom
half). Basically, I need to disable the bottom half whenever the driver has
been called to do some work. The tasklet is just a periodic timer that keeps
the hardware awake, but it should never pre-empty the driver itself.
To do this, I have added local_bh_disable() calls at the top of every entry
point in my driver. This works very well. However, I would add to like
additional checks to make sure that various code is not executed whenever
bottom halves are disabled.
I discovered function in_softirq(), but I'm having a hard time understanding
it. There's no documentation for it (not even any comments!), and the modules
in the kernel that do use it don't explain it either.
The code for in_softirq() makes me think that it returns non-zero if any
thread on this CPU has called local_bh_disable(), which is what I want. But
what does in_softirq() means? If I call local_bh_disable(), soft IRQs are
disabled, are they not? Isn't that what a bottom-half is, a soft IRQ?
reply other threads:[~2001-10-17 22:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3BCE0C41.7090003@interactivesi.com \
--to=ttabi@interactivesi.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-kernel@vger.kernel.org \
/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