arm support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@221 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2003-06-09 15:29:55 +00:00
parent 0f533160c7
commit a95c67907c
3 changed files with 64 additions and 11 deletions

12
exec.h
View file

@ -246,6 +246,18 @@ static inline int testandset (int *p)
}
#endif
#ifdef __arm__
static inline int testandset (int *spinlock)
{
register unsigned int ret;
__asm__ __volatile__("swp %0, %1, [%2]"
: "=r"(ret)
: "0"(1), "r"(spinlock));
return ret;
}
#endif
typedef int spinlock_t;
#define SPIN_LOCK_UNLOCKED 0