David Howells wrote: > 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. Sorry, David. If I had read the copyright line for rwsem.h I would have sent the original e-mail to you. I've added the generic spinlock versions. I've also renamed the i386 versions to __down_*_trylock() and added stubs to include/linux/rwsem.h, as you did for the up_*() and down_*() routines. The generic versions were compiled but not tested. Probably not a big deal since I snagged most of the code from your __down_*() routines. -- Brian Watson | "The common people of England... so Linux Kernel Developer | jealous of their liberty, but like the SSI Clustering Laboratory | common people of most other countries Compaq Computer Corp | never rightly considering wherein it Los Angeles, CA | consists..." | -Adam Smith, Wealth of Nations, 1776 mailto:Brian.J.Watson@compaq.com http://opensource.compaq.com/