From 97bef5b7fd4a21a3655870220fb0886cea3f3f42 Mon Sep 17 00:00:00 2001 From: Dave Korn Date: Tue, 7 Jul 2009 21:41:43 +0000 Subject: [PATCH] * winbase.h (ilockexch): Avoid making 'ret' volatile. (ilockcmpexch): Likewise. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/winbase.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index dcabc2992..e3163bba3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-07-07 Dave Korn + + * winbase.h (ilockexch): Avoid making 'ret' volatile. + (ilockcmpexch): Likewise. + 2009-07-07 Dave Korn * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h index eec196d53..00c71a923 100644 --- a/winsup/cygwin/winbase.h +++ b/winsup/cygwin/winbase.h @@ -40,7 +40,7 @@ ilockexch (volatile long *t, long v) { return ({ - register __typeof (*t) ret __asm ("%eax"); + register long ret __asm ("%eax"); __asm __volatile ("\n" "1: lock cmpxchgl %2, %1\n" " jne 1b\n" @@ -56,7 +56,7 @@ ilockcmpexch (volatile long *t, long v, long c) { return ({ - register __typeof (*t) ret __asm ("%eax"); + register long ret __asm ("%eax"); __asm __volatile ("lock cmpxchgl %2, %1" : "=a" (ret), "=m" (*t) : "r" (v), "m" (*t), "0" (c)