Re: inconsistent usage of

Duncan Sands (baldrick@wanadoo.fr)
Tue, 22 Apr 2003 10:40:45 +0200


> void foo()
> {
> unsigned long local_flags;
> spin_lock_irqsave (&qtlock, local_flags);
> spin_lock_irqsave (&qtlock, local_flags);
> }
>
> Calling the function foo() works proper in none SMP kernels. I assume, the
> spinlocks internaly will be initialized as
> recursive semaphore as default. So it is possible to aquire it more than
> once by the same thread.

No. If you acquire it twice then you die. The above code is wrong.
Where did you find it?

All the best,

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