]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Drop compat code for gcc3.x/RHEL5 2994/head
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Fri, 4 Dec 2015 15:54:23 +0000 (16:54 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Fri, 4 Dec 2015 15:55:13 +0000 (16:55 +0100)
Closes #320

pdns/misc.hh

index 0e5a0123daef017b339318d7b3c6bd9cd0b11f88..eb1dbd4482040986907e18e53ec7175ce0939e8d 100644 (file)
@@ -410,33 +410,10 @@ public:
 private:
     mutable native_t value_;
 
-    // the below is necessary because __sync_fetch_and_add is not universally available on i386.. I 3> RHEL5.
-#if defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
-    static native_t atomic_exchange_and_add( native_t * pw, native_t dv )
-    {
-        // int r = *pw;
-        // *pw += dv;
-        // return r;
-
-        native_t r;
-
-        __asm__ __volatile__
-        (
-            "lock\n\t"
-            "xadd %1, %0":
-            "+m"( *pw ), "=r"( r ): // outputs (%0, %1)
-            "1"( dv ): // inputs (%2 == %1)
-            "memory", "cc" // clobbers
-        );
-
-        return r;
-    }
-    #else
     static native_t atomic_exchange_and_add( native_t * pw, native_t dv )
     {
       return __sync_fetch_and_add(pw, dv);
     }
-    #endif
 };
 
 // FIXME400 this should probably go?