* winbase.h (ilockexch): Avoid making 'ret' volatile.

(ilockcmpexch): Likewise.
This commit is contained in:
Dave Korn 2009-07-07 21:41:43 +00:00
parent cd6c79f4fe
commit 97bef5b7fd
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
* winbase.h (ilockexch): Avoid making 'ret' volatile.
(ilockcmpexch): Likewise.
2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
* Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o

View File

@ -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)