diff options
author | Andrew Waterman <waterman@eecs.berkeley.edu> | 2012-11-17 03:43:57 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@eecs.berkeley.edu> | 2012-11-17 03:43:57 -0800 |
commit | 8c4a41f9835d56437c44631d97ef592e948385d9 (patch) | |
tree | a9f957f4123aa99e4ceee1957e84df40cd9c299b /pk/frontend.c | |
parent | 93f6f1ff134333a61580677a685ad61718ad0726 (diff) | |
download | pk-8c4a41f9835d56437c44631d97ef592e948385d9.zip pk-8c4a41f9835d56437c44631d97ef592e948385d9.tar.gz pk-8c4a41f9835d56437c44631d97ef592e948385d9.tar.bz2 |
fix spinlocks; add --disable-atomics cfg opt
Diffstat (limited to 'pk/frontend.c')
-rw-r--r-- | pk/frontend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pk/frontend.c b/pk/frontend.c index 4e4c138..1818b0f 100644 --- a/pk/frontend.c +++ b/pk/frontend.c @@ -17,11 +17,13 @@ sysret_t frontend_syscall(long n, long a0, long a1, long a2, long a3) magic_mem[3] = a2; magic_mem[4] = a3; - asm volatile ("cflush; fence"); + mb(); mtpcr(PCR_TOHOST, magic_mem); while (mtpcr(PCR_FROMHOST, 0) == 0); + mb(); + sysret_t ret = {magic_mem[0],magic_mem[1]}; spinlock_unlock(&lock); |