summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps
diff options
context:
space:
mode:
authorDavid McCullough <davidm@snapgear.com>2002-09-17 02:08:25 +0000
committerDavid McCullough <davidm@snapgear.com>2002-09-17 02:08:25 +0000
commitaf612503bc09303d4f648d774ce01840dd57adb0 (patch)
treef24e94716dcbc1970b5d94e814685da1b07c793b /libpthread/linuxthreads/sysdeps
parentc21b7e64b85e18113f7bf01b72bbc7904b55e2c6 (diff)
Fixup thread support for the 5200/5307 coldfire platforms.
Diffstat (limited to 'libpthread/linuxthreads/sysdeps')
-rw-r--r--libpthread/linuxthreads/sysdeps/m68k/pt-machine.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
index 38ea68114..644bc2f0c 100644
--- a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
@@ -30,7 +30,12 @@ testandset (int *spinlock)
{
char ret;
- __asm__ __volatile__("tas %1; sne %0"
+ __asm__ __volatile__(
+#ifdef __mcf5200__
+ "bset #7,%1; sne %0"
+#else
+ "tas %1; sne %0"
+#endif
: "=dm"(ret), "=m"(*spinlock)
: "m"(*spinlock)
: "cc");
@@ -47,6 +52,7 @@ register char * stack_pointer __asm__ ("%sp");
/* Compare-and-swap for semaphores. */
+#ifndef __mcf5200__
#define HAS_COMPARE_AND_SWAP
PT_EI int
__compare_and_swap (long int *p, long int oldval, long int newval)
@@ -60,3 +66,5 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
return ret;
}
+#endif
+