]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Solaris x86 compatibility fix
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Sep 2007 17:18:24 +0000 (17:18 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Sep 2007 17:18:24 +0000 (17:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81569 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/lock.h

index c261b7d33de58e6bf552d7a7db3dfc348e3ead66..eea145acf083d61ba01d1b7fee87dbe34b2b9e64 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 */