]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove legacy support for Tru64
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 08:53:38 +0000 (10:53 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:47 +0000 (10:31 +0200)
configure
configure.in
lib/isc/alpha/include/isc/atomic.h
lib/isc/include/isc/platform.h.in
lib/isc/timer.c

index b3241709a8d680eb4e65085aa7d5f6b073cab047..29c9233fb98ef433869c932dbb1b84c9632c9192 100755 (executable)
--- a/configure
+++ b/configure
@@ -710,7 +710,6 @@ ISC_PLATFORM_BUSYWAITNOP
 ISC_ARCH_DIR
 ISC_PLATFORM_USEMACASM
 ISC_PLATFORM_USESTDASM
-ISC_PLATFORM_USEOSFASM
 ISC_PLATFORM_USEGCCASM
 ISC_PLATFORM_HAVEATOMICSTOREQ
 ISC_PLATFORM_HAVEATOMICSTORE
@@ -19550,7 +19549,6 @@ fi
 
 
 
-ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
 ISC_PLATFORM_USEGCCASM="#undef ISC_PLATFORM_USEGCCASM"
 ISC_PLATFORM_USESTDASM="#undef ISC_PLATFORM_USESTDASM"
 ISC_PLATFORM_USEMACASM="#undef ISC_PLATFORM_USEMACASM"
@@ -19608,9 +19606,6 @@ _ACEOF
                        arch=x86_32
                fi
        ;;
-       alpha*-*)
-               arch=alpha
-       ;;
        powerpc-*|powerpc64-*)
                arch=powerpc
        ;;
@@ -19678,40 +19673,11 @@ $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                fi
-       else
-               case "$host" in
-               alpha*-dec-osf*)
-                       # Tru64 compiler has its own syntax for inline
-                       # assembly.
-                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-#ifndef __DECC
-#error "unexpected compiler"
-#endif
-                               return (0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  compiler=osf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               ;;
-               esac
        fi
        case "$compiler" in
        gcc)
                ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
                ;;
-       osf)
-               ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
-               ;;
        mac)
                ;;
        *)
@@ -19776,7 +19742,6 @@ fi
 
 
 
-
 ISC_ARCH_DIR=$arch
 
 
index f3e1f521de0be4dd51cfaedc8977d06d7baed2c5..fa2125e3052099e6b1e5d45c05455c0e3a5d4923 100644 (file)
@@ -2824,7 +2824,6 @@ fi
 
 AC_SUBST(ISC_PLATFORM_HAVESTDATOMIC)
 
-ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
 ISC_PLATFORM_USEGCCASM="#undef ISC_PLATFORM_USEGCCASM"
 ISC_PLATFORM_USESTDASM="#undef ISC_PLATFORM_USESTDASM"
 ISC_PLATFORM_USEMACASM="#undef ISC_PLATFORM_USEMACASM"
@@ -2850,9 +2849,6 @@ if test "yes" = "$use_atomic"; then
                        arch=x86_32
                fi
        ;;
-       alpha*-*)
-               arch=alpha
-       ;;
        powerpc-*|powerpc64-*)
                arch=powerpc
        ;;
@@ -2898,27 +2894,11 @@ if test "yes" = "$have_atomic"; then
                        ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
                        ], [AC_MSG_RESULT(no)])
                fi
-       else
-               case "$host" in
-               alpha*-dec-osf*)
-                       # Tru64 compiler has its own syntax for inline 
-                       # assembly.
-                       AC_TRY_COMPILE(, [
-#ifndef __DECC
-#error "unexpected compiler"
-#endif
-                               return (0);],
-                               [compiler=osf],)
-               ;;
-               esac
        fi
        case "$compiler" in
        gcc)
                ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
                ;;
-       osf)
-               ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
-               ;;
        mac)
                ;;
        *)
@@ -2964,7 +2944,6 @@ AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
 AC_SUBST(ISC_PLATFORM_HAVEATOMICSTOREQ)
 
 AC_SUBST(ISC_PLATFORM_USEGCCASM)
-AC_SUBST(ISC_PLATFORM_USEOSFASM)
 AC_SUBST(ISC_PLATFORM_USESTDASM)
 AC_SUBST(ISC_PLATFORM_USEMACASM)
 
index e704fef042196bb682367b5861cd132d08f2e0da..9e60912047475935a67d7a0874210138ee8ba0be 100644 (file)
 #include <isc/platform.h>
 #include <isc/types.h>
 
-#ifdef ISC_PLATFORM_USEOSFASM
-#include <c_asm.h>
-
-#pragma intrinsic(asm)
-
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.  Memory access ordering around this function
- * can be critical, so we add explicit memory block instructions at the
- * beginning and the end of it (same for other functions).
- */
-static inline int32_t
-isc_atomic_xadd(int32_t *p, int32_t val) {
-       return (asm("mb;"
-                   "1:"
-                   "ldl_l %t0, 0(%a0);"        /* load old value */
-                   "mov %t0, %v0;"             /* copy the old value */
-                   "addl %t0, %a1, %t0;"       /* calculate new value */
-                   "stl_c %t0, 0(%a0);"        /* attempt to store */
-                   "beq %t0, 1b;"              /* spin if failed */
-                   "mb;",
-                   p, val));
-}
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static inline void
-isc_atomic_store(int32_t *p, int32_t val) {
-       (void)asm("mb;"
-                 "1:"
-                 "ldl_l %t0, 0(%a0);"          /* load old value */
-                 "mov %a1, %t0;"               /* value to store */
-                 "stl_c %t0, 0(%a0);"          /* attempt to store */
-                 "beq %t0, 1b;"                /* spin if failed */
-                 "mb;",
-                 p, val);
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'.  The original value is returned in any
- * case.
- */
-static inline int32_t
-isc_atomic_cmpxchg(int32_t *p, int32_t cmpval, int32_t val) {
-
-       return(asm("mb;"
-                  "1:"
-                  "ldl_l %t0, 0(%a0);"         /* load old value */
-                  "mov %t0, %v0;"              /* copy the old value */
-                  "cmpeq %t0, %a1, %t0;"       /* compare */
-                  "beq %t0, 2f;"               /* exit if not equal */
-                  "mov %a2, %t0;"              /* value to store */
-                  "stl_c %t0, 0(%a0);"         /* attempt to store */
-                  "beq %t0, 1b;"               /* if it failed, spin */
-                  "2:"
-                  "mb;",
-                  p, cmpval, val));
-}
-#elif defined (ISC_PLATFORM_USEGCCASM)
+#if defined (ISC_PLATFORM_USEGCCASM)
 static inline int32_t
 isc_atomic_xadd(int32_t *p, int32_t val) {
        int32_t temp, prev;
index 807ca9f3c6d1ba0e31ef1acb11d4c0f0e9cd5aba..5f10e621fe69a0481b141ccdfb6726cb0068ac40 100644 (file)
  */
 @ISC_PLATFORM_USEGCCASM@
 
-/*
- * Define if Tru64 style ASM syntax must be used.
- */
-@ISC_PLATFORM_USEOSFASM@
-
 /*
  * Define if the standard __asm function must be used.
  */
index d85fe970698c607e575a729667b6a1cbdb1ae52d..65b72b882be3fb3f74c20f23413930bb8ff798f1 100644 (file)
@@ -161,7 +161,6 @@ schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
        isc__timermgr_t *manager;
        isc_time_t due;
        int cmp;
-       bool timedwait;
 
        /*!
         * Note: the caller must ensure locking.
@@ -171,13 +170,6 @@ schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
 
        manager = timer->manager;
 
-       /*!
-        * If the manager was timed wait, we may need to signal the
-        * manager to force a wakeup.
-        */
-       timedwait = (manager->nscheduled > 0 &&
-                    isc_time_seconds(&manager->due) != 0);
-
        /*
         * Compute the new due time.
         */
@@ -240,31 +232,6 @@ schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
         * run thread, or explicitly setting the value in the manager.
         */
 
-       /*
-        * This is a temporary (probably) hack to fix a bug on tru64 5.1
-        * and 5.1a.  Sometimes, pthread_cond_timedwait() doesn't actually
-        * return when the time expires, so here, we check to see if
-        * we're 15 seconds or more behind, and if we are, we signal
-        * the dispatcher.  This isn't such a bad idea as a general purpose
-        * watchdog, so perhaps we should just leave it in here.
-        */
-       if (signal_ok && timedwait) {
-               isc_interval_t fifteen;
-               isc_time_t then;
-
-               isc_interval_set(&fifteen, 15, 0);
-               result = isc_time_add(&manager->due, &fifteen, &then);
-
-               if (result == ISC_R_SUCCESS &&
-                   isc_time_compare(&then, now) < 0) {
-                       SIGNAL(&manager->wakeup);
-                       signal_ok = false;
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                     ISC_LOGMODULE_TIMER, ISC_LOG_WARNING,
-                                     "*** POKED TIMER ***");
-               }
-       }
-
        if (timer->index == 1 && signal_ok) {
                XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
                                      ISC_MSG_SIGNALSCHED,