Re: inconsistent usage of

From: Duncan Sands (baldrick@wanadoo.fr)
Date: Tue Apr 22 2003 - 03:40:45 EST


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



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:32 EST