lkml.org 
[lkml]   [2003]   [Apr]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromDuncan Sands <>
SubjectRe: inconsistent usage of
DateTue, 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/

\
 
 \ /
  Last update: 2005-03-22 12:34    [from the cache]
©2003-2008