Re: [PATCH] read/write semaphore trylock routines - 2.4.6

David Howells (dhowells@redhat.com)
Tue, 10 Jul 2001 08:32:54 +0100


> A caveat for these trylock routines is that they use the cmpxchg
> instruction, which limits their usefulness on x86 to 486 and above.

Given that the implementation in that asm-i386/rwsem.h is based around usage
of the XADD instruction which exists everywhere the CMPXCHG instruction does
(I believe), you don't really need to put the #if clause around it.

You should also add spinlock versions too, which will cover most other archs.

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