correct use of lock_kernel() - help! please

Roman Zippel zippel at fh-brandenburg.de
Mon Jan 29 22:05:10 EST 2001


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/





More information about the Linuxppc-dev mailing list