bug in asm/rwlock.h?

duane voth (duanev@interactivesi.com)
Mon, 16 Jul 2001 18:44:37 -0500


I was looking at the symetry in rwlock.h and noticed this:

#define __build_read_lock_ptr(rw, helper) \
asm volatile(LOCK "subl $1,(%0)\n\t" \
....

#define __build_read_lock_const(rw, helper) \
asm volatile(LOCK "subl $1,%0\n\t" \
....

#define __build_write_lock_ptr(rw, helper) \
asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
....

#define __build_write_lock_const(rw, helper) \
asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
....

Why is %0 used indirectly in __build_write_lock_const?
Shouldn't it be

asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \

like in __build_read_lock_const?

It doesn't look like many people use __build_write_lock_const.

duane

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/