Re: recursive spinlocks. Shoot.

Martin J. Bligh (mbligh@aracnet.com)
Mon, 19 May 2003 07:28:22 -0700


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