[svn-commits] file: trunk r40303 - /trunk/include/asterisk/lock.h
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu Aug 17 14:14:03 MST 2006
Author: file
Date: Thu Aug 17 16:14:03 2006
New Revision: 40303
URL: http://svn.digium.com/view/asterisk?rev=40303&view=rev
Log:
Use OSAtomicAdd instead of OSAtomicDecrement to decrement the value by 1.
Modified:
trunk/include/asterisk/lock.h
Modified: trunk/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/lock.h?rev=40303&r1=40302&r2=40303&view=diff
==============================================================================
--- trunk/include/asterisk/lock.h (original)
+++ trunk/include/asterisk/lock.h Thu Aug 17 16:14:03 2006
@@ -789,12 +789,12 @@
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 4)
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
- return OSAtomicDecrement32((int32_t *) p) == 0;
+ return OSAtomicAdd32( -1, (int32_t *) p) == 0;
})
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 8)
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
- return OSAtomicDecrement64((int64_t *) p) == 0;
+ return OSAtomicAdd64( -1, (int64_t *) p) == 0;
#else
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
More information about the svn-commits
mailing list