Re: spinlocks dont work

From: Rik van Riel
Date: Fri Feb 13 2004 - 18:13:04 EST


On Fri, 13 Feb 2004 RANDAZZO@xxxxxxxxxxx wrote:

> On my uniprocessor system, I have two LKM's
^^^^^^^^^^^^

> how come spin locks don't work?????

The spinlock code is compiled to NOPs on uniprocessor
systems. That is ok because the second driver cannot
run while the first driver is holding the lock.

You cannot reschedule while holding a spinlock.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

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