testandset and cpu_interrupt
Hello,
Function testandset is referenced by cpu_interrupt, spin_lock and spin_trylock (spin_lock and spin_trylock
for CONFIG_USER_ONLY). All these invocations assume that testandset should return zero when lock is successfully acquired.
I noticed that implementation of testandset for x86 does opposite, i.e. returns NON-zero when lock is successfully acquired.
Before fixing the problem, it would be useful to check
implementation of testandset for other architectures, which I'm unable to do.
I'm very impressed with QEMU. Thanks for excellent work,
Piotrek
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
Quoted 5 lines · Piotr Krysik
Hello,
Function testandset is referenced by
cpu_interrupt,spin_lockandspin_trylock(spin_lockandspin_trylock
Quoted 7 lines
for
CONFIG_USER_ONLY). All these invocations assume that testandset should return zero when lock is successfully acquired.I noticed that implementation of testandset for x86 does opposite, i.e. returns NON-zero when lock is successfully acquired.
seems like m68k does the same.
Richard