correct use of lock_kernel() - help! please

2 messages, 2 authors, 2001-01-29 · open the first message on its own page

correct use of lock_kernel() - help! please

From: Iain Sandoe <hidden>
Date: 2001-01-29 10:29:56

Hi,

In the driver I am working on (dmasound) someone has placed lock/unlock
_kernel() pairs around whole functions.

This means that (e.g.) if we release the sound device with a lot of
un-played samples at a low-ish sample rate...

AFACIT we could hold the kernel locked for *several seconds*

What do I really need to protect with lock/unlock pairs?

or am I missing something (it wouldn't be the first time ..) ;-?

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: correct use of lock_kernel() - help! please

From: Roman Zippel <hidden>
Date: 2001-01-29 11:05:10

Hi,

On Mon, 29 Jan 2001, Iain Sandoe wrote:
AFACIT we could hold the kernel locked for *several seconds*
If you sleep inbetween, it's no problem. The kernel lock is released
automatically during sleep and reget after sleeping.
What do I really need to protect with lock/unlock pairs?
SMP protection. Only a single processor can hold the kernel lock at the
same time. The preferred solution is of course to use semaphores /
spinlocks.

bye, Roman


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help