* in_softirq() question
@ 2001-10-17 22:54 Timur Tabi
0 siblings, 0 replies; only message in thread
From: Timur Tabi @ 2001-10-17 22:54 UTC (permalink / raw)
To: Linux Kernel Mailing List, Kernel Newbies Mailing List
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-17 22:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-17 22:54 in_softirq() question Timur Tabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox