svn path=/trunk/; revision=29071
\r
return (y & ~mask) != 0;\r
}\r
-\r
-static __inline__ __attribute__((always_inline)) long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand)\r
-{\r
- long retval = Comperand;\r
- __asm__ __volatile__ (\r
- "sync\n"\r
- "1: lwarx %0,0,%1\n"\r
- " subf. %0,%2,%0\n"\r
- " bne 2f\n"\r
- " stwcx. %3,0,%1\n"\r
- " bne- 1b\n"\r
- "2: isync"\r
- : "=b" (retval)\r
- : "b" (Destination), "r" (Comperand), "r" (Exchange)\r
- : "cr0", "memory");\r
- return retval;\r
-}\r
#endif\r
\r
static __inline__ __attribute__((always_inline)) long _InterlockedDecrement(volatile long * const lpAddend)\r