summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-09-26 11:59:04 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-09-26 11:59:04 +0000
commit32dea828c9a0152168bad7b69928f5f0ec106cb1 (patch)
tree54f6a7a8880b8081fd6746d8b1887111e07b9658 /lib/libpthread
parent1a3e8e95912b75185dd024aa6bf9f758afecbc24 (diff)
downloadFreeBSD-src-32dea828c9a0152168bad7b69928f5f0ec106cb1.zip
FreeBSD-src-32dea828c9a0152168bad7b69928f5f0ec106cb1.tar.gz
Add __volatile keyword.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/arch/alpha/include/atomic_ops.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libpthread/arch/alpha/include/atomic_ops.h b/lib/libpthread/arch/alpha/include/atomic_ops.h
index caa291b..7c3e62b 100644
--- a/lib/libpthread/arch/alpha/include/atomic_ops.h
+++ b/lib/libpthread/arch/alpha/include/atomic_ops.h
@@ -39,7 +39,8 @@ static inline void
atomic_swap_long(long *dst, long val, long *res)
{
/* $1 and $2 are t0 and t1 respectively. */
- __asm ( " ldq $1, %1\n" /* get cache line before lock */
+ __asm __volatile (
+ " ldq $1, %1\n" /* get cache line before lock */
"1: ldq_l $1, %1\n" /* load *dst asserting lock */
" mov %2, $2\n" /* save value to be swapped */
" stq_c $2, %1\n" /* attempt the store; $2 clobbered */
@@ -55,7 +56,8 @@ static inline void
atomic_swap_int(int *dst, int val, int *res)
{
/* $1 and $2 are t0 and t1 respectively. */
- __asm ( " ldl $1, %1\n" /* get cache line before lock */
+ __asm __volatile (
+ " ldl $1, %1\n" /* get cache line before lock */
"1: ldl_l $1, %1\n" /* load *dst asserting lock */
" mov %2, $2\n" /* save value to be swapped */
" stl_c $2, %1\n" /* attempt the store; $2 clobbered */
OpenPOWER on IntegriCloud