Merged revisions 81569 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Sep 2007 21:45:19 +0000 (21:45 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Sep 2007 21:45:19 +0000 (21:45 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81569 | tilghman | 2007-09-05 12:18:24 -0500 (Wed, 05 Sep 2007) | 2 lines

Solaris x86 compatibility fix

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81631 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/lock.h

index 90ff690..22c7ef1 100644 (file)
@@ -789,7 +789,11 @@ AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
 AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
 {
        __asm __volatile (
+#ifdef sun
+       "       lock;  xaddl   %0, %1 ;        "
+#else
        "       lock   xaddl   %0, %1 ;        "
+#endif
        : "+r" (v),                     /* 0 (result) */   
          "=m" (*p)                     /* 1 */
        : "m" (*p));                    /* 2 */