Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-06-04 00:48:02 +0400
committerChristopher Faylor <me@cgf.cx>2004-06-04 00:48:02 +0400
commitee94df3eccde219778b98223d001ed244b3d3891 (patch)
tree0a2492172203153e0dd8dbf22de9a4576cf28c4d
parent414bfc10727d91bd2a0a586374c8b54c5ab5510f (diff)
* winbase.h (ilockincr): YA correction to ensure correct operation with no
optimization. (ilockdecr): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/winbase.h8
2 files changed, 10 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 33b30640d..dabd6fc97 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h
index 3d1f202ec..0411afd7b 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;
}