extern inline int __compare_and_swap(long * p, long oldval, long newval)
__compare_and_swap (long int *p, long int oldval, long int newval)
extern inline int __compare_and_swap(long * p, long oldval, long newval){  long ret;  __asm__ __volatile__ (	"/* Inline compare & swap */\n"	"1:\t"	"ldq_l %0,%4\n\t"	"cmpeq %0,%2,%0\n\t"	"beq %0,2f\n\t"	"mov %3,%0\n\t"	"stq_c %0,%1\n\t"	"beq %0,1b\n\t"	"2:\tmb\n"	"/* End compare & swap */"	: "=&r"(ret), "=m"(*p)	: "r"(oldval), "r"(newval), "m"(*p));  return ret;}