* 2.6.3 _raw_write_trylock and __down_write_trylock
@ 2004-02-23 1:15 Keith Owens
2004-02-23 19:53 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: Keith Owens @ 2004-02-23 1:15 UTC (permalink / raw)
To: linux-ia64
2.6.3 defines include/asm-ia64/spinlock.h::_raw_write_trylock (both asm
and C versions) and include/asm-ia64/rwsem.h::__down_write_trylock.
The C version of _raw_write_trylock is functionally identical to
__down_write_trylock, but the code is completely different. Why have
two implementations with such radically different code for the same
feature? Why have both a C and asm version of _raw_write_trylock when
the C version will work everywhere?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.3 _raw_write_trylock and __down_write_trylock
2004-02-23 1:15 2.6.3 _raw_write_trylock and __down_write_trylock Keith Owens
@ 2004-02-23 19:53 ` David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2004-02-23 19:53 UTC (permalink / raw)
To: linux-ia64
>>>>> On Mon, 23 Feb 2004 12:15:57 +1100, Keith Owens <kaos@sgi.com> 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.
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-23 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 1:15 2.6.3 _raw_write_trylock and __down_write_trylock Keith Owens
2004-02-23 19:53 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox