aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/spinlock.h')
-rw-r--r--linuxthreads/spinlock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index f88e8f3..b3d0231 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -49,7 +49,7 @@ 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)
+#define testandset(p) !__compare_and_swap((long int *) p, 0, 1)
#endif
#ifdef HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS