Remove legacy support for Tru64
This commit is contained in:
35
configure
vendored
35
configure
vendored
@@ -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
|
||||
|
||||
|
||||
|
||||
21
configure.in
21
configure.in
@@ -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)
|
||||
|
||||
|
||||
@@ -51,67 +51,7 @@
|
||||
#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;
|
||||
|
||||
@@ -266,11 +266,6 @@
|
||||
*/
|
||||
@ISC_PLATFORM_USEGCCASM@
|
||||
|
||||
/*
|
||||
* Define if Tru64 style ASM syntax must be used.
|
||||
*/
|
||||
@ISC_PLATFORM_USEOSFASM@
|
||||
|
||||
/*
|
||||
* Define if the standard __asm function must be used.
|
||||
*/
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user