summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-29 13:36:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-29 13:36:24 +0000
commit539d976bc619c176c5ce0fda845ebe0fe24cd2d1 (patch)
treeaf8b3de802cb16ab824fabb72d8cb49b60fb46d0 /sal
parentFix interlck.c to work on Mac OS again... (diff)
downloadcore-539d976bc619c176c5ce0fda845ebe0fe24cd2d1.tar.gz
core-539d976bc619c176c5ce0fda845ebe0fe24cd2d1.zip
that decrement doesn't look right
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/interlck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c
index 3ab6e9600efd..6345279680b3 100644
--- a/sal/osl/unx/interlck.c
+++ b/sal/osl/unx/interlck.c
@@ -86,6 +86,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
: "+r" (nCount), "+m" (*pCount)
: /* nothing */
: "memory");
+ return --nCount;
}
#if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
else
@@ -103,7 +104,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
#endif
}
-#elif defined ( GCC )
+#elif ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
{
return __sync_add_and_fetch(pCount, 1);