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

From: David Howells (dhowells@redhat.com)
Date: Tue Jul 10 2001 - 02:32:54 EST


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



This archive was generated by hypermail 2b29 : Sun Jul 15 2001 - 21:00:11 EST