Re: 2.6.3 _raw_write_trylock and __down_write_trylock

From: David Mosberger <>
Date: 2004-02-24 06:53:42
>>>>> On Mon, 23 Feb 2004 12:15:57 +1100, Keith Owens <> said:

  Keith> 2.6.3 defines include/asm-ia64/spinlock.h::_raw_write_trylock
  Keith> (both asm and C versions) and
  Keith> include/asm-ia64/rwsem.h::__down_write_trylock.

  Keith> The C version of _raw_write_trylock is functionally identical
  Keith> to __down_write_trylock, but the code is completely
  Keith> different.  Why have two implementations with such radically
  Keith> different code for the same feature?  Why have both a C and
  Keith> asm version of _raw_write_trylock when the C version will
  Keith> work everywhere?

rwsem.h implements read-write semaphores, spinlock.h implements
read-write spinlocks.

GCC doesn't schedule the C code for _raw_write_lock() well, hence the
explicit ASM-version.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Mon Feb 23 14:58:19 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:22 EST