Re: question: spinlocks and userspace.

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Wed, 10 Nov 1999 13:44:36 +0100 (CET)


> the problem itself is the nontrivial one. You are trying to take a
> spinlock-protected 'snapshot' of an indefinit-length kernel-space object,
> and that is a nontrivial concept. The 'easy' solution is to give up
> atomicity.

additionally: if the data structure is never accessed from IRQ handlers
then it's fast and safe to use a semaphore instead of a spinlock.

-- mingo

-
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/