From: cgf Date: Thu, 3 Jun 2004 20:48:01 +0000 (+0000) Subject: * winbase.h (ilockincr): YA correction to ensure correct operation with no X-Git-Tag: reparent-point~2270 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=37d941c4707c5beca0aa0397f062bb9c77ae227b;p=pf3gnuchains%2Fpf3gnuchains4x.git * winbase.h (ilockincr): YA correction to ensure correct operation with no optimization. (ilockdecr): Ditto. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 33b30640d2..dabd6fc977 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2004-06-03 Christopher Faylor + + * winbase.h (ilockincr): YA correction to ensure correct operation with + no optimization. + (ilockdecr): Ditto. + 2004-06-03 Corinna Vinschen * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump. diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h index 3d1f202ec7..0411afd7b0 100644 --- a/winsup/cygwin/winbase.h +++ b/winsup/cygwin/winbase.h @@ -9,9 +9,9 @@ ilockincr (long *m) register int __res; __asm__ __volatile__ ("\n\ movl $1,%0\n\ - lock xadd %0,%1\n\ + lock xadd %0,%2\n\ inc %0\n\ - ": "=a" (__res), "+m" (*m): : "cc"); + ": "=a" (__res), "=m" (*m): "m" (m): "cc"); return __res; } @@ -21,9 +21,9 @@ ilockdecr (long *m) register int __res; __asm__ __volatile__ ("\n\ movl $0xffffffff,%0\n\ - lock xadd %0,%1\n\ + lock xadd %0,%2\n\ dec %0\n\ - ": "=a" (__res), "+m" (*m): : "cc"); + ": "=a" (__res), "=m" (*m): "m" (m): "cc"); return __res; }