From: Manfred Spraul <manfred@colorfullife.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: in_atomic() & spin_lock / spin_unlock in different functions
Date: Sun, 13 Oct 2002 21:21:02 +0200 [thread overview]
Message-ID: <3DA9C79E.7010307@colorfullife.com> (raw)
> What is it that in_atomic counts? Obviously spinlocks and
> get_cpu/put_cpu. Anything else?
>
preempt_disable(), local_irq_disable(), local_bh_disable().
> I'm doing spin_lock_irqsave() then in another function
> spin_unlock_irqrestore. Is that okay? If no, can it cause "scheduling
> in atomic"?
It's not okay, but shouldn't cause scheduling in atomic messages.
The problem is sparc: the 'unsigned long flags' parameter used by
_irqsave and _irqrestore contains the stack frame, which means that you
cannot pass it between functions.
--
Manfred
next reply other threads:[~2002-10-13 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-13 19:21 Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-10-13 18:38 in_atomic() & spin_lock / spin_unlock in different functions Pavel Machek
2002-10-13 19:40 ` Robert Love
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=3DA9C79E.7010307@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 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.