* generic read_trylock() never tries, it always waits
@ 2005-12-12 4:55 Keith Owens
0 siblings, 0 replies; only message in thread
From: Keith Owens @ 2005-12-12 4:55 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arm-kernel, rmk, takata, linux-mips, parisc-linux,
linux-sh, lethal, davem, sparclinux
Copied to assorted architecture maintainers and mailing lists, please
trim cc: list back to lkml plus arch if you reply.
The generic version of read_trylock() never tests if the lock is in
use, it always spins waiting for the lock to be free. IOW, it behaves
like read_lock(). Given the different implementations of rwlock_t, it
is hard for generic__raw_read_trylock() to do anything else.
I strongly recommend that the architectures below define their own
version of __raw_read_trylock() that really test the lock first, then
we can ditch generic__raw_read_trylock(). I have already sent an ia64
patch to that mailing list.
include/asm-arm/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-ia64/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-m32r/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-mips/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-parisc/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-sh/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-sparc64/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-12 4:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 4:55 generic read_trylock() never tries, it always waits Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®