summaryrefslogtreecommitdiffstats
path: root/exec.h
diff options
context:
space:
mode:
authorbellard2003-08-11 00:14:22 +0200
committerbellard2003-08-11 00:14:22 +0200
commit38e584a07279fffcfbfcafb207ce842edd093033 (patch)
tree574d309b088a86987dd8bab48844d71996fdb76e /exec.h
parentadded VGA emulation - added PS/2 mouse and keyboard emulation - use SDL for V... (diff)
downloadqemu-38e584a07279fffcfbfcafb207ce842edd093033.tar.gz
qemu-38e584a07279fffcfbfcafb207ce842edd093033.tar.xz
qemu-38e584a07279fffcfbfcafb207ce842edd093033.zip
m68k host port (Richard Zidlicky)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@357 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.h')
-rw-r--r--exec.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/exec.h b/exec.h
index 5c4e841a72..54571a232a 100644
--- a/exec.h
+++ b/exec.h
@@ -348,6 +348,18 @@ static inline int testandset (int *spinlock)
}
#endif
+#ifdef __mc68000
+static inline int testandset (int *p)
+{
+ char ret;
+ __asm__ __volatile__("tas %1; sne %0"
+ : "=r" (ret)
+ : "m" (p)
+ : "cc","memory");
+ return ret == 0;
+}
+#endif
+
typedef int spinlock_t;
#define SPIN_LOCK_UNLOCKED 0