mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tachio Terauchi <tachio@cs.berkeley.edu>
To: linux-kernel@vger.kernel.org
Subject: calling sleeping functions with interrupts disabled
Date: Mon, 19 Nov 2001 14:27:18 -0800	[thread overview]
Message-ID: <20011119142718.B1084@kokako.cs.berkeley.edu> (raw)


We're trying to run a program analysis tool on the kernel source to
check for sleeping functions being called while interrupts are
disabled.  This will be similar to what people at Stanford did, but
we'll be using a different technique.

Here's my question:

I noticed that sleep_on() disables interrupts before it calls
schedule().  This puzzles me because my understanding was that
schedule() must not be called with interrupts disabled (if there are
no more threads to run then the system would deadlock).  Does
schedule() re-enable interrupts (it looks like it does)?  If so, why
is it bad to call sleeping functions with interrupts disabled?

Sorry if this is a silly question...

-Tachio

                 reply	other threads:[~2001-11-19 22:27 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=20011119142718.B1084@kokako.cs.berkeley.edu \
    --to=tachio@cs.berkeley.edu \
    --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®