summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps
diff options
context:
space:
mode:
authorDavid McCullough <davidm@snapgear.com>2003-02-28 04:12:09 +0000
committerDavid McCullough <davidm@snapgear.com>2003-02-28 04:12:09 +0000
commit7988cf3664da108df037162271596660b4076c6b (patch)
treece6a2c31e278d5f3eeac1755f297ffb1201278d8 /libpthread/linuxthreads/sysdeps
parent187dd78d7bd1c03fcf16e54a30314512d38e1a4a (diff)
restore the coldfire changes
Diffstat (limited to 'libpthread/linuxthreads/sysdeps')
-rw-r--r--libpthread/linuxthreads/sysdeps/m68k/pt-machine.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
index 161b53469..bb6fb3fdb 100644
--- a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
@@ -35,7 +35,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");
@@ -52,6 +57,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)
@@ -65,5 +71,6 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
return ret;
}
+#endif
#endif /* pt-machine.h */