From: "Leonidas ." <leonidas137@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: How to check whether executing in atomic context?
Date: Tue, 13 Oct 2009 23:36:01 -0700 [thread overview]
Message-ID: <f22d86810910132336r1d6f6363qa983b355676dc413@mail.gmail.com> (raw)
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.
next reply other threads:[~2009-10-14 6:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 6:36 Leonidas . [this message]
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 .
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=f22d86810910132336r1d6f6363qa983b355676dc413@mail.gmail.com \
--to=leonidas137@gmail.com \
--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
all inboxes | Powered by JetHome®