Re: spinlock which can morph into a mutex

From: Andi Kleen
Date: Fri Dec 18 2009 - 10:26:27 EST


Miquel van Smoorenburg <miquels@xxxxxxxxxx> writes:
>
> So I probably need a mutex instead of a spinlock, but I want to
> keep minimal overhead for the common case (when no resizing is in
> progress). I think I need a spinlock that can morph into a mutex ..

The standed mutexes already do that by themselves.

-Andi

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