From: Roland McGrath Date: Thu, 20 Mar 2003 11:40:51 +0000 (+0000) Subject: * sysdeps/powerpc/bits/atomic.h (atomic_exchange): Remove unused X-Git-Tag: upstream/2.30~19675 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ff16e041a767bfedec01b6f614ecffb3fb0f653;p=external%2Fglibc.git * sysdeps/powerpc/bits/atomic.h (atomic_exchange): Remove unused variable. Remove superfluous memory clobber. * include/atomic.h: Syntax braino fix. * posix/tst-nice.c (do_test): Use %m formats instead of printing errno in decimal. Don't bail if niced at start. Just check that nice call bumps the total at all. --- diff --git a/ChangeLog b/ChangeLog index 9688194..e5b9662 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-03-20 Roland McGrath + + * sysdeps/powerpc/bits/atomic.h (atomic_exchange): Remove unused + variable. Remove superfluous memory clobber. + + * include/atomic.h: Syntax braino fix. + + * posix/tst-nice.c (do_test): Use %m formats instead of printing errno + in decimal. Don't bail if niced at start. Just check that nice call + bumps the total at all. + 2003-03-20 Alexandre Oliva * sysdeps/mips/bits/setjmp.h: Store all N32 and N64 registers, diff --git a/include/atomic.h b/include/atomic.h index 5177764..87b2df8 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -112,7 +112,8 @@ /* Decrement *MEM if it is > 0, and return the old value. */ -#ifndef atomic_decrement_if_positive(mem) \ +#ifndef atomic_decrement_if_positive +# define atomic_decrement_if_positive(mem) \ ({ __typeof (*mem) __val; \ __typeof (*mem) __oldval; \ __typeof (mem) __memp; \ diff --git a/sysdeps/powerpc/bits/atomic.h b/sysdeps/powerpc/bits/atomic.h index 13001cb..956272c 100644 --- a/sysdeps/powerpc/bits/atomic.h +++ b/sysdeps/powerpc/bits/atomic.h @@ -111,14 +111,14 @@ typedef uintmax_t uatomic_max_t; #define atomic_exchange(mem, value) \ ({ if (sizeof (*mem) != 4) \ abort (); \ - int __val, __tmp; \ + int __val; \ __asm __volatile (__ARCH_REL_INSTR "\n" \ "1: lwarx %0,0,%2\n" \ " stwcx. %3,0,%2\n" \ " bne- 1b" \ : "=&r" (__val), "=m" (*mem) \ : "r" (mem), "r" (value), "1" (*mem) \ - : "cr0", "memory"); \ + : "cr0"); \ __val; })