diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-29 13:36:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-29 13:36:24 +0000 |
commit | 539d976bc619c176c5ce0fda845ebe0fe24cd2d1 (patch) | |
tree | af8b3de802cb16ab824fabb72d8cb49b60fb46d0 | |
parent | Fix interlck.c to work on Mac OS again... (diff) | |
download | core-539d976bc619c176c5ce0fda845ebe0fe24cd2d1.tar.gz core-539d976bc619c176c5ce0fda845ebe0fe24cd2d1.zip |
that decrement doesn't look right
-rw-r--r-- | sal/osl/unx/interlck.c | 3 |
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); |