Re: mutexs for synchronization between kernel threads?

Andi Kleen (ak@muc.de)
22 Apr 1999 09:26:47 +0200


Johannes Erdfelt <jerdfelt@sventech.com> writes:
>
> I guess what I want are spinlocks, but the kernel spinlock
> implementation seems to be created for protecting across multiple CPU's,
> not across multiple context's of execution (thread's)

If you don't sleep in the critical region you don't need any locks
at all on UP (except against the interrupt). Linux uses cooperative
multitasking in the kernel.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/