aboutsummaryrefslogtreecommitdiff
path: root/exec.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-07-07 11:30:47 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-07-07 11:30:47 +0000
commit3c1cf9fa865927759a78d476a218a7759fb38fb4 (patch)
tree3685bb1a07b7db30483ecd3282adbb321866324a /exec.h
parent1f47a9223ebe3d0c9c779f72341afc10c206d574 (diff)
dummy rdmsr and wrmsr support - xor reg, reg optimization
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@311 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.h')
-rw-r--r--exec.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/exec.h b/exec.h
index 92b248db03..1f46e4a469 100644
--- a/exec.h
+++ b/exec.h
@@ -324,6 +324,7 @@ typedef int spinlock_t;
#define SPIN_LOCK_UNLOCKED 0
+#if 1
static inline void spin_lock(spinlock_t *lock)
{
while (testandset(lock));
@@ -338,6 +339,20 @@ static inline int spin_trylock(spinlock_t *lock)
{
return !testandset(lock);
}
+#else
+static inline void spin_lock(spinlock_t *lock)
+{
+}
+
+static inline void spin_unlock(spinlock_t *lock)
+{
+}
+
+static inline int spin_trylock(spinlock_t *lock)
+{
+ return 1;
+}
+#endif
extern spinlock_t tb_lock;