mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* winbase.h (ilockincr): YA correction to ensure correct operation with no
optimization. (ilockdecr): Ditto.
This commit is contained in:
parent
414bfc1072
commit
ee94df3ecc
@ -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>
|
||||
|
||||
* cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user