From: "Peter T. Breuer" <ptb@inv.it.uc3m.es>
To: "linux kernel" <linux-kernel@vger.kernel.org>
Subject: sleep under spinlock, sequencer.c, 2.6.12.5
Date: Fri, 19 Aug 2005 10:13:48 +0200 (MET DST) [thread overview]
Message-ID: <200508190813.j7J8Dml28378@inv.it.uc3m.es> (raw)
The following "sleep under spinlock" is still present as of linux
2.6.12.5 in sound/oss/sequencer.c in midi_outc:
n = 3 * HZ; /* Timeout */
spin_lock_irqsave(&lock,flags);
while (n && !midi_devs[dev]->outputc(dev, data)) {
interruptible_sleep_on_timeout(&seq_sleeper, HZ/25);
n--;
}
spin_unlock_irqrestore(&lock,flags);
I haven't thought about it, just noted it. It's been there forever
(some others in the sound architecture have been gradually disappearing
as newer kernels come out).
This code found during an analysis of about 1.5 million lines of kernel
code by the static kernel code analyser at
ftp://oboe.it.uc3m.es/pub/Programs/c-1.2.*.tgz
(and yes, I am the author - if anyone wants to help please contact me).
Peter
next reply other threads:[~2005-08-19 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 8:13 Peter T. Breuer [this message]
2005-08-19 18:07 ` Alan Cox
2005-08-20 0:01 ` Nish Aravamudan
2005-08-22 15:17 ` Peter T. Breuer
2005-08-22 16:22 ` Nish Aravamudan
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=200508190813.j7J8Dml28378@inv.it.uc3m.es \
--to=ptb@inv.it.uc3m.es \
--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
Powered by JetHome