All of lore.kernel.org
 help / color / mirror / Atom feed
* How to check whether executing in atomic context?
@ 2009-10-14  6:36 Leonidas .
  2009-10-14  9:21 ` Leonidas .
  0 siblings, 1 reply; 11+ messages in thread
From: Leonidas . @ 2009-10-14  6:36 UTC (permalink / raw)
  To: linux-kernel

Hi List,

I am working on a profiler kind of module, the exported apis of my
module can be
called from process context and interrupt context as well. Depending on the
context I am called in, I need to call sleepable/nonsleepable variants
of my internal
bookkeeping functions.

I am aware of in_interrupt() call which can be used to check current
context and take action
accordingly.

Is there any api which can help figure out whether we are executing
while hold a spinlock? I.e
an api which can help figure out sleepable/nonsleepable context? If it
is not there, what can
be done for writing the same? Any pointers will be helpful.

-Leo.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-10-15  8:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  6:36 How to check whether executing in atomic context? Leonidas .
2009-10-14  9:21 ` Leonidas .
2009-10-14  9:34   ` Leonidas .
2009-10-14 10:13   ` Gleb Natapov
2009-10-14 10:24     ` Leonidas .
2009-10-14 17:39       ` Stefan Richter
2009-10-14 19:11         ` Leonidas .
2009-10-14 19:15           ` Stefan Richter
2009-10-14 19:22             ` Samuel Thibault
2009-10-14 19:24             ` Leonidas .
2009-10-15  8:31               ` Leonidas .

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.