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 /winsup/cygwin/winbase.h
parent414bfc10727d91bd2a0a586374c8b54c5ab5510f (diff)
* winbase.h (ilockincr): YA correction to ensure correct operation with no
optimization. (ilockdecr): Ditto.
Diffstat (limited to 'winsup/cygwin/winbase.h')
-rw-r--r--winsup/cygwin/winbase.h8
1 files changed, 4 insertions, 4 deletions
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;
}