[asterisk-commits] file: trunk r97041 - /trunk/utils/extconf.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 8 09:26:51 CST 2008


Author: file
Date: Tue Jan  8 09:26:50 2008
New Revision: 97041

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97041
Log:
Make ast_atomic_fetchadd_int_slow magically appear in extconf.
(closes issue #11703)
Reported by: dmartin

Modified:
    trunk/utils/extconf.c

Modified: trunk/utils/extconf.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/extconf.c?view=diff&rev=97041&r1=97040&r2=97041
==============================================================================
--- trunk/utils/extconf.c (original)
+++ trunk/utils/extconf.c Tue Jan  8 09:26:50 2008
@@ -1756,8 +1756,6 @@
  * as ast_atomic_fetchadd_int_slow()
  */
 
-int ast_atomic_fetchadd_int_slow(volatile int *p, int v);
-
 #if defined(HAVE_OSX_ATOMICS)
 #include "libkern/OSAtomic.h"
 #endif
@@ -1791,7 +1789,14 @@
 	: "m" (*p));                    /* 2 */
 	return (v);
 })
-#else   /* low performance version in utils.c */
+#else
+static int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
+{
+	int ret;
+	ret = *p;
+	*p += v;
+	return ret;
+}
 AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
 {
 	return ast_atomic_fetchadd_int_slow(p, v);




More information about the asterisk-commits mailing list