* winbase.h (ilockincr): YA correction to ensure correct operation with no

optimization.
(ilockdecr): Ditto.
This commit is contained in:
Christopher Faylor 2004-06-03 20:48:02 +00:00
parent 414bfc1072
commit ee94df3ecc
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2004-06-03 Christopher Faylor <me@cgf.cx>
* winbase.h (ilockincr): YA correction to ensure correct operation with
no optimization.
(ilockdecr): Ditto.
2004-06-03 Corinna Vinschen <corinna@vinschen.de> 2004-06-03 Corinna Vinschen <corinna@vinschen.de>
* cygserver.h (CYGWIN_SERVER_VERSION_API): Bump. * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.

View File

@ -9,9 +9,9 @@ ilockincr (long *m)
register int __res; register int __res;
__asm__ __volatile__ ("\n\ __asm__ __volatile__ ("\n\
movl $1,%0\n\ movl $1,%0\n\
lock xadd %0,%1\n\ lock xadd %0,%2\n\
inc %0\n\ inc %0\n\
": "=a" (__res), "+m" (*m): : "cc"); ": "=a" (__res), "=m" (*m): "m" (m): "cc");
return __res; return __res;
} }
@ -21,9 +21,9 @@ ilockdecr (long *m)
register int __res; register int __res;
__asm__ __volatile__ ("\n\ __asm__ __volatile__ ("\n\
movl $0xffffffff,%0\n\ movl $0xffffffff,%0\n\
lock xadd %0,%1\n\ lock xadd %0,%2\n\
dec %0\n\ dec %0\n\
": "=a" (__res), "+m" (*m): : "cc"); ": "=a" (__res), "=m" (*m): "m" (m): "cc");
return __res; return __res;
} }