From da64e6bb4ea8e1c7ef7aadd113ed701089fb1512 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 8 Sep 2008 22:25:14 +0000 Subject: 008-09-08 Jeff Johnston * libc/sys/linux/dl/atomicity.h (exchange_and_add): Fix asm statement to use "m" instead of "0". (atomic_add): Ditto. * libc/sys/linux/linuxthreads/spinlock.c (__pthread_release): Ditto. * libc/sys/linux/net/getaddrinfo.c: Add limit.h include. * libc/sys/linux/stdlib/glob.c: Ditto. --- newlib/libc/sys/linux/linuxthreads/spinlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libc/sys/linux/linuxthreads') diff --git a/newlib/libc/sys/linux/linuxthreads/spinlock.c b/newlib/libc/sys/linux/linuxthreads/spinlock.c index 3e1682599..f21426ffe 100644 --- a/newlib/libc/sys/linux/linuxthreads/spinlock.c +++ b/newlib/libc/sys/linux/linuxthreads/spinlock.c @@ -31,7 +31,7 @@ static inline void __pthread_release(int * spinlock) { WRITE_MEMORY_BARRIER(); *spinlock = __LT_SPINLOCK_INIT; - __asm __volatile ("" : "=m" (*spinlock) : "0" (*spinlock)); + __asm __volatile ("" : "=m" (*spinlock) : "m" (*spinlock)); } #endif @@ -110,7 +110,7 @@ again: #ifdef BUSY_WAIT_NOP BUSY_WAIT_NOP; #endif - __asm __volatile ("" : "=m" (lock->__status) : "0" (lock->__status)); + __asm __volatile ("" : "=m" (lock->__status) : "m" (lock->__status)); } lock->__spinlock += (spin_count - lock->__spinlock) / 8; -- cgit v1.2.3