From: Christian Hofstaedtler Date: Fri, 4 Dec 2015 15:54:23 +0000 (+0100) Subject: Drop compat code for gcc3.x/RHEL5 X-Git-Tag: dnsdist-1.0.0-alpha1~129^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2994%2Fhead;p=thirdparty%2Fpdns.git Drop compat code for gcc3.x/RHEL5 Closes #320 --- diff --git a/pdns/misc.hh b/pdns/misc.hh index 0e5a0123da..eb1dbd4482 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -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?