diff options
Diffstat (limited to 'linuxthreads/sysdeps/alpha')
-rw-r--r-- | linuxthreads/sysdeps/alpha/pt-machine.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linuxthreads/sysdeps/alpha/pt-machine.h b/linuxthreads/sysdeps/alpha/pt-machine.h index e59c6906c8..25ba634528 100644 --- a/linuxthreads/sysdeps/alpha/pt-machine.h +++ b/linuxthreads/sysdeps/alpha/pt-machine.h @@ -32,6 +32,10 @@ register char *stack_pointer __asm__("$30"); +/* Memory barrier; default is to do nothing */ +#define MEMORY_BARRIER() __asm__ __volatile__("mb" : : : "memory") + + /* Spinlock implementation; required. */ PT_EI long int testandset (int *spinlock) @@ -55,11 +59,6 @@ testandset (int *spinlock) return ret; } -/* Spinlock release; default is just set to zero. */ -#define RELEASE(spinlock) \ - __asm__ __volatile__("mb" : : : "memory"); \ - *spinlock = 0 - /* Begin allocating thread stacks at this address. Default is to allocate them just below the initial program stack. */ @@ -102,7 +101,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval) "2:\tmb\n" "/* End compare & swap */" : "=&r"(ret), "=m"(*p) - : "r"(oldval), "r"(newval), "m"(*p)); + : "r"(oldval), "r"(newval), "m"(*p) + : "memory"); return ret; } |