Re: recursive spinlocks. Shoot.

From: Martin J. Bligh (mbligh@aracnet.com)
Date: Mon May 19 2003 - 09:28:22 EST


> That's a problem looking for a solution! No, the reason for wanting a
> recursive spinlock is that nonrecursive locks make programming harder.

And more correct.
 
> Though I've got quite good at finding and removing deadlocks in my old
> age, there are still two popular ways that the rest of the world's
> prgrammers often shoot themselves in the foot with a spinlock:
>
> a) sleeping while holding the spinlock
> b) taking the spinlock in a subroutine while you already have it

So ... we should BUG() on both.

M.
-
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 : Fri May 23 2003 - 22:00:34 EST