On Thu, 23 Apr 2015 14:43:40 +0100, Filipe Manana wrote:

> I don't think a lock followed by unlock without nothing in between (be
> it a spinlock, mutex, or any other kind of lock) will be seen by the
> compiler as a nop. Pretty sure I've seen this pattern being done in the

No, I didn't say they would - that would be wrong. I just found it odd,
that's all.

> kernel and in many other places as mechanism to wait for something.

I also completely forgot that spinlocks disable preemption, since
otherwise nothing would really work. That's the real reason why
any of this works. Well, that and the refcount==2 thing.

Cool! Thanks!
Holger

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to