summaryrefslogtreecommitdiff
path: root/sal/osl/unx/interlck.c
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 15:47:28 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 15:47:28 +0000
commite6611cc2ef5960e9f32c56da44fafd02446f53e6 (patch)
tree6358ced419ac9412ae39cbb7032f602ff0e7de7c /sal/osl/unx/interlck.c
parent243a97038bdab8f2ec448df19c88ac2638035531 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sal/osl/unx/interlck.c')
-rw-r--r--sal/osl/unx/interlck.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c
index 1662b0b6de66..d7bf224cfe53 100644
--- a/sal/osl/unx/interlck.c
+++ b/sal/osl/unx/interlck.c
@@ -2,9 +2,9 @@
*
* $RCSfile: interlck.c,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hr $ $Date: 2001-05-02 15:03:13 $
+ * last change: $Author: hr $ $Date: 2003-03-26 16:46:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,9 +83,11 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount*
"lock\n\t"
"xadd %0, %2\n\t"
"incl %0"
- : "=a" (nCount), "=m" (*pCount)
+ : "=&r" (nCount), "=m" (*pCount)
: "m" (*pCount)
: "memory");
+
+ return nCount;
}
oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount)
@@ -97,9 +99,11 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
"lock\n\t"
"xadd %0, %2\n\t"
"decl %0"
- : "=a" (nCount), "=m" (*pCount)
+ : "=&r" (nCount), "=m" (*pCount)
: "m" (*pCount)
: "memory");
+
+ return nCount;
}
#elif defined ( GCC ) && defined ( POWERPC )
@@ -117,7 +121,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount*
" addi %0,%0,1\n\t"
" stwcx. %0,0,%2\n\t"
" bne- 1b"
- : "=r" (nCount), "=m" (*pCount)
+ : "=&r" (nCount), "=m" (*pCount)
: "r" (pCount)
: "r4", "memory");
@@ -134,7 +138,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
" subi %0,%0,1\n\t"
" stwcx. %0,0,%2\n\t"
" bne- 1b"
- : "=r" (nCount), "=m" (*pCount)
+ : "=&r" (nCount), "=m" (*pCount)
: "r" (pCount)
: "r4", "memory");