lkml.org 
[lkml]   [2005]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectsleep under spinlock, sequencer.c, 2.6.12.5
Date

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-19 10:16    [W:0.096 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site