From dfef32ef796146357481a6f7949ba900108c655e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Jul 2000 02:26:07 +0000 Subject: Update. 2000-07-21 Ulrich Drepper * sysdeps/powerpc/strchr.S: Correct bugs introduced in BP-ification. Patch by Franz Sirl . --- linuxthreads/spinlock.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linuxthreads/spinlock.h') diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h index 703b72d..6d3d343 100644 --- a/linuxthreads/spinlock.h +++ b/linuxthreads/spinlock.h @@ -48,6 +48,10 @@ static inline int compare_and_swap(long * ptr, long oldval, long newval, #elif defined(HAS_COMPARE_AND_SWAP) +#ifdef IMPLEMENT_TAS_WITH_CAS +#define testandset(p) !__compare_and_swap(p, 0, 1) +#endif + #ifdef HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS static inline int -- cgit v1.1