1
1

Per RFC, another round in the renaming game - nearly complete

This commit was SVN r31668.
Этот коммит содержится в:
Ralph Castain 2014-05-07 03:01:47 +00:00
родитель a54dbb17d2
Коммит f4c31cae9b
31 изменённых файлов: 231 добавлений и 230 удалений

Просмотреть файл

@ -88,7 +88,7 @@ AC_DEFUN([OPAL_CHECK_ASM_GLOBAL],[
AC_DEFINE_UNQUOTED([OPAL_ASM_GLOBAL], ["$opal_cv_asm_global"],
[Assembly directive for exporting symbols])
OPAL_ASM_GLOBAL="$opal_cv_asm_global"
AC_SUBST(OMPI_AS_GLOBAL)
AC_SUBST(OPAL_AS_GLOBAL)
])dnl
@ -239,12 +239,12 @@ $opal_cv_asm_global ${sym}gsym_test_func
${sym}gsym_test_func${opal_cv_asm_label_suffix}
$opal_cv_asm_endproc ${sym}gsym_test_func
],
[ompi_compile="$CC $CFLAGS -I. conftest_c.c -c > conftest.cmpl 2>&1"
if AC_TRY_EVAL(ompi_compile) ; then
[opal_compile="$CC $CFLAGS -I. conftest_c.c -c > conftest.cmpl 2>&1"
if AC_TRY_EVAL(opal_compile) ; then
# save the warnings
cat conftest.cmpl >&AC_FD_CC
ompi_link="$CC $CFLAGS conftest_c.$OBJEXT conftest.$OBJEXT -o conftest $LDFLAGS $LIBS > conftest.link 2>&1"
if AC_TRY_EVAL(ompi_link) ; then
opal_link="$CC $CFLAGS conftest_c.$OBJEXT conftest.$OBJEXT -o conftest $LDFLAGS $LIBS > conftest.link 2>&1"
if AC_TRY_EVAL(opal_link) ; then
# save the warnings
cat conftest.link >&AC_FD_CC
asm_result=1
@ -295,7 +295,7 @@ AC_DEFUN([OPAL_CHECK_ASM_LABEL_SUFFIX],[
AC_DEFINE_UNQUOTED([OPAL_ASM_LABEL_SUFFIX], ["$opal_cv_asm_label_suffix"],
[Assembly suffix for labels])
OPAL_ASM_LABEL_SUFFIX="$opal_cv_asm_label_suffix"
AC_SUBST(OMPI_AS_LABEL_SUFFIX)
AC_SUBST(OPAL_AS_LABEL_SUFFIX)
])dnl
@ -320,20 +320,20 @@ AC_DEFUN([OPAL_CHECK_ASM_ALIGN_LOG],[
.align 4
foo$opal_cv_asm_label_suffix
.byte 2],
[ompi_asm_addr=[`$NM conftest.$OBJEXT | $GREP foo | sed -e 's/.*\([0-9a-fA-F][0-9a-fA-F]\).*foo.*/\1/'`]],
[ompi_asm_addr=""])
[opal_asm_addr=[`$NM conftest.$OBJEXT | $GREP foo | sed -e 's/.*\([0-9a-fA-F][0-9a-fA-F]\).*foo.*/\1/'`]],
[opal_asm_addr=""])
# test for both 16 and 10 (decimal and hex notations)
echo "configure: .align test address offset is $ompi_asm_addr" >&AC_FD_CC
if test "$ompi_asm_addr" = "16" -o "$ompi_asm_addr" = "10" ; then
echo "configure: .align test address offset is $opal_asm_addr" >&AC_FD_CC
if test "$opal_asm_addr" = "16" -o "$opal_asm_addr" = "10" ; then
opal_cv_asm_align_log="yes"
else
opal_cv_asm_align_log="no"
fi])
if test "$opal_cv_asm_align_log" = "yes" -o "$opal_cv_asm_align_log" = "1" ; then
ompi_asm_align_log_result=1
opal_asm_align_log_result=1
else
ompi_asm_align_log_result=0
opal_asm_align_log_result=0
fi
AC_DEFINE_UNQUOTED([OPAL_ASM_ALIGN_LOG],
@ -561,7 +561,7 @@ AC_DEFUN([OPAL_CHECK_SPARCV8PLUS],[
dnl #################################################################
dnl
dnl OMPI_CHECK_INLINE_GCC
dnl OPAL_CHECK_INLINE_GCC
dnl
dnl Check if the compiler is capable of doing GCC-style inline
dnl assembly. Some compilers emit a warning and ignore the inline
@ -581,7 +581,7 @@ dnl some compilers (i.e. earlier versions of Sun Studio 12) do not
dnl necessarily handle xaddl properly, so that needs to be detected
dnl during configure time.
dnl
dnl DEFINE OMPI_GCC_INLINE_ASSEMBLY to 0 or 1 depending on GCC
dnl DEFINE OPAL_GCC_INLINE_ASSEMBLY to 0 or 1 depending on GCC
dnl support
dnl
dnl #################################################################
@ -639,9 +639,9 @@ return ret;]])],
dnl #################################################################
dnl
dnl OMPI_CHECK_INLINE_DEC
dnl OPAL_CHECK_INLINE_DEC
dnl
dnl DEFINE OMPI_DEC to 0 or 1 depending on DEC
dnl DEFINE OPAL_DEC to 0 or 1 depending on DEC
dnl support
dnl
dnl #################################################################
@ -674,9 +674,9 @@ return 0;]])],
dnl #################################################################
dnl
dnl OMPI_CHECK_INLINE_XLC
dnl OPAL_CHECK_INLINE_XLC
dnl
dnl DEFINE OMPI_XLC to 0 or 1 depending on XLC
dnl DEFINE OPAL_XLC to 0 or 1 depending on XLC
dnl support
dnl
dnl #################################################################
@ -920,10 +920,10 @@ AC_MSG_ERROR([Can not continue.])
#
case $host_os in
aix*)
ompi_asm_arch_config="aix"
opal_asm_arch_config="aix"
;;
*)
ompi_asm_arch_config="default"
opal_asm_arch_config="default"
;;
esac
@ -934,12 +934,12 @@ AC_MSG_ERROR([Can not continue.])
# format:
# config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack
asm_format="${ompi_asm_arch_config}"
asm_format="${opal_asm_arch_config}"
asm_format="${asm_format}-${opal_cv_asm_text}-${opal_cv_asm_global}"
asm_format="${asm_format}-${opal_cv_asm_label_suffix}-${opal_cv_asm_gsym}"
asm_format="${asm_format}-${opal_cv_asm_lsym}"
asm_format="${asm_format}-${opal_cv_asm_type}-${opal_asm_size}"
asm_format="${asm_format}-${ompi_asm_align_log_result}"
asm_format="${asm_format}-${opal_asm_align_log_result}"
if test "$opal_cv_asm_arch" = "POWERPC32" -o "$opal_cv_asm_arch" = "POWERPC64" ; then
asm_format="${asm_format}-${opal_cv_asm_powerpc_r_reg}"
else
@ -959,7 +959,7 @@ AC_MSG_ERROR([Can not continue.])
AC_SUBST([OPAL_ASSEMBLY_FORMAT])
fi # if opal_cv_asm_builtin = BUILTIN_SYNC
result="OMPI_$opal_cv_asm_arch"
result="OPAL_$opal_cv_asm_arch"
OPAL_ASSEMBLY_ARCH="$opal_cv_asm_arch"
AC_MSG_CHECKING([for asssembly architecture])
AC_MSG_RESULT([$opal_cv_asm_arch])
@ -967,7 +967,7 @@ AC_MSG_ERROR([Can not continue.])
[Architecture type of assembly to use for atomic operations and CMA])
AC_SUBST([OPAL_ASSEMBLY_ARCH])
result="OMPI_$opal_cv_asm_builtin"
result="OPAL_$opal_cv_asm_builtin"
OPAL_ASSEMBLY_BUILTIN="$opal_cv_asm_builtin"
AC_MSG_CHECKING([for builtin atomics])
AC_MSG_RESULT([$opal_cv_asm_builtin])
@ -975,7 +975,7 @@ AC_MSG_ERROR([Can not continue.])
[Whether to use builtin atomics])
AC_SUBST([OPAL_ASSEMBLY_BUILTIN])
OMPI_ASM_FIND_FILE
OPAL_ASM_FIND_FILE
unset result asm_format
])dnl
@ -983,13 +983,13 @@ AC_MSG_ERROR([Can not continue.])
dnl #################################################################
dnl
dnl OMPI_ASM_FIND_FILE
dnl OPAL_ASM_FIND_FILE
dnl
dnl
dnl do all the evil mojo to provide a working assembly file
dnl
dnl #################################################################
AC_DEFUN([OMPI_ASM_FIND_FILE], [
AC_DEFUN([OPAL_ASM_FIND_FILE], [
AC_REQUIRE([AC_PROG_GREP])
AC_REQUIRE([AC_PROG_FGREP])
@ -1021,8 +1021,8 @@ if test "$opal_cv_asm_arch" != "WINDOWS" -a "$opal_cv_asm_builtin" != "BUILTIN_S
AC_MSG_CHECKING([whether possible to generate assembly file])
mkdir -p opal/asm/generated
opal_cv_asm_file="atomic-local.s"
ompi_try='$PERL $top_ompi_srcdir/opal/asm/generate-asm.pl $opal_cv_asm_arch "$opal_cv_asm_format" $top_ompi_srcdir/opal/asm/base $top_ompi_builddir/opal/asm/generated/$opal_cv_asm_file >conftest.out 2>&1'
if AC_TRY_EVAL(ompi_try) ; then
opal_try='$PERL $top_ompi_srcdir/opal/asm/generate-asm.pl $opal_cv_asm_arch "$opal_cv_asm_format" $top_ompi_srcdir/opal/asm/base $top_opal_builddir/opal/asm/generated/$opal_cv_asm_file >conftest.out 2>&1'
if AC_TRY_EVAL(opal_try) ; then
# save the warnings
cat conftest.out >&AC_FD_CC
AC_MSG_RESULT([yes])

Просмотреть файл

@ -21,7 +21,7 @@
#include "opal/sys/atomic.h"
#include "opal/sys/architecture.h"
#if OPAL_ASSEMBLY_ARCH == OMPI_SPARC
#if OPAL_ASSEMBLY_ARCH == OPAL_SPARC
#if OPAL_WANT_SMP_LOCKS
@ -82,4 +82,4 @@ opal_atomic_sub_32(volatile int32_t *addr, int delta)
}
#endif /* OPAL_ASSEMBLY_ARCH == OMPI_SPARC32 */
#endif /* OPAL_ASSEMBLY_ARCH == OPAL_SPARC32 */

Просмотреть файл

@ -16,8 +16,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On alpha, everything is load-locked, store-conditional...
@ -55,7 +55,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline void opal_atomic_mb(void)
{
@ -74,7 +74,7 @@ static inline void opal_atomic_wmb(void)
WMB();
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
/**********************************************************************
@ -82,7 +82,7 @@ static inline void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_32( volatile int32_t *addr,
int32_t oldval, int32_t newval)
@ -174,7 +174,7 @@ static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr,
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "atomic.h"
EOF

Просмотреть файл

@ -16,8 +16,8 @@
*
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On amd64, we use cmpxchg.
@ -49,7 +49,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline void opal_atomic_mb(void)
{
@ -68,7 +68,7 @@ static inline void opal_atomic_wmb(void)
MB();
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
/**********************************************************************
@ -76,7 +76,7 @@ static inline void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_32( volatile int32_t *addr,
int32_t oldval, int32_t newval)
@ -92,12 +92,12 @@ static inline int opal_atomic_cmpset_32( volatile int32_t *addr,
return (int)ret;
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_acq_32 opal_atomic_cmpset_32
#define opal_atomic_cmpset_rel_32 opal_atomic_cmpset_32
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -114,12 +114,12 @@ static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
return (int)ret;
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_acq_64 opal_atomic_cmpset_64
#define opal_atomic_cmpset_rel_64 opal_atomic_cmpset_64
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#define OPAL_HAVE_ATOMIC_SWAP_32 1
@ -137,9 +137,9 @@ static inline int32_t opal_atomic_swap_32( volatile int32_t *addr,
return oldval;
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int64_t opal_atomic_swap_64( volatile int64_t *addr,
int64_t newval)
@ -153,11 +153,11 @@ static inline int64_t opal_atomic_swap_64( volatile int64_t *addr,
return oldval;
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#define OPAL_HAVE_ATOMIC_MATH_32 1
#define OPAL_HAVE_ATOMIC_MATH_64 1
@ -246,6 +246,6 @@ static inline int64_t opal_atomic_sub_64(volatile int64_t* v, int64_t i)
return (ret-i);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -16,14 +16,14 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
typedef uint64_t opal_timer_t;
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#if 0
static inline opal_timer_t
@ -56,6 +56,6 @@ opal_timer_t opal_sys_timer_get_cycles(void);
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "atomic.h"
#include "timer.h"

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -25,26 +26,26 @@
#define OPAL_SYS_ARCHITECTURE_H
/* Architectures */
#define OMPI_UNSUPPORTED 0000
#define OMPI_IA32 0010
#define OMPI_IA64 0020
#define OMPI_AMD64 0030
#define OMPI_ALPHA 0040
#define OMPI_POWERPC32 0050
#define OMPI_POWERPC64 0051
#define OMPI_SPARC 0060
#define OMPI_SPARCV9_32 0061
#define OMPI_SPARCV9_64 0062
#define OMPI_MIPS 0070
#define OMPI_ARM 0100
#define OMPI_BUILTIN_SYNC 0200
#define OMPI_BUILTIN_OSX 0201
#define OMPI_BUILTIN_NO 0202
#define OPAL_UNSUPPORTED 0000
#define OPAL_IA32 0010
#define OPAL_IA64 0020
#define OPAL_AMD64 0030
#define OPAL_ALPHA 0040
#define OPAL_POWERPC32 0050
#define OPAL_POWERPC64 0051
#define OPAL_SPARC 0060
#define OPAL_SPARCV9_32 0061
#define OPAL_SPARCV9_64 0062
#define OPAL_MIPS 0070
#define OPAL_ARM 0100
#define OPAL_BUILTIN_SYNC 0200
#define OPAL_BUILTIN_OSX 0201
#define OPAL_BUILTIN_NO 0202
/* Formats */
#define OMPI_DEFAULT 1000 /* standard for given architecture */
#define OMPI_DARWIN 1001 /* Darwin / OS X on PowerPC */
#define OMPI_PPC_LINUX 1002 /* Linux on PowerPC */
#define OMPI_AIX 1003 /* AIX on Power / PowerPC */
#define OPAL_DEFAULT 1000 /* standard for given architecture */
#define OPAL_DARWIN 1001 /* Darwin / OS X on PowerPC */
#define OPAL_PPC_LINUX 1002 /* Linux on PowerPC */
#define OPAL_AIX 1003 /* AIX on Power / PowerPC */
#endif /* #ifndef OPAL_SYS_ARCHITECTURE_H */

Просмотреть файл

@ -28,8 +28,8 @@
* See Documentation/arm/kernel_user_helpers.txt in the kernel tree for details
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
#if OPAL_WANT_SMP_LOCKS
@ -109,7 +109,7 @@ void opal_atomic_wmb(void)
*
*********************************************************************/
#if (OMPI_GCC_INLINE_ASSEMBLY && (OPAL_ASM_ARM_VERSION >= 6))
#if (OPAL_GCC_INLINE_ASSEMBLY && (OPAL_ASM_ARM_VERSION >= 6))
#define OPAL_HAVE_ATOMIC_CMPSET_32 1
#define OPAL_HAVE_ATOMIC_MATH_32 1
@ -280,4 +280,4 @@ static inline int opal_atomic_cmpset_rel_32(volatile int32_t *addr,
#endif
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -9,8 +9,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
#include <sys/times.h>
@ -30,4 +30,4 @@ opal_sys_timer_get_cycles(void)
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "../architecture.h"
#include "atomic.h"

Просмотреть файл

@ -56,7 +56,7 @@
/* do some quick #define cleanup in cases where we are doing
testing... */
#ifdef OMPI_DISABLE_INLINE_ASM
#ifdef OPAL_DISABLE_INLINE_ASM
#undef OPAL_C_GCC_INLINE_ASSEMBLY
#define OPAL_C_GCC_INLINE_ASSEMBLY 0
#undef OPAL_C_DEC_INLINE_ASSEMBLY
@ -65,17 +65,17 @@
#define OPAL_C_XLC_INLINE_ASSEMBLY 0
#endif
/* define OMPI_{GCC,DEC,XLC}_INLINE_ASSEMBLY based on the
OMPI_C_{GCC,DEC,XLC}_INLINE_ASSEMBLY defines and whether we
/* define OPAL_{GCC,DEC,XLC}_INLINE_ASSEMBLY based on the
OPAL_C_{GCC,DEC,XLC}_INLINE_ASSEMBLY defines and whether we
are in C or C++ */
#if defined(c_plusplus) || defined(__cplusplus)
/* We no longer support inline assembly for C++ as OPAL is a C-only interface */
#define OMPI_GCC_INLINE_ASSEMBLY 0
#define OMPI_DEC_INLINE_ASSEMBLY 0
#define OPAL_GCC_INLINE_ASSEMBLY 0
#define OPAL_DEC_INLINE_ASSEMBLY 0
#define OPAL_XLC_INLINE_ASSEMBLY 0
#else
#define OMPI_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OPAL_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OPAL_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#endif
@ -109,7 +109,7 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t;
* files if we need to specify them as inline or non-inline
*
*********************************************************************/
#if !OMPI_GCC_INLINE_ASSEMBLY
#if !OPAL_GCC_INLINE_ASSEMBLY
#define OPAL_HAVE_INLINE_ATOMIC_MEM_BARRIER 0
#define OPAL_HAVE_INLINE_ATOMIC_CMPSET_32 0
#define OPAL_HAVE_INLINE_ATOMIC_CMPSET_64 0
@ -139,31 +139,31 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t;
*********************************************************************/
#if defined(DOXYGEN)
/* don't include system-level gorp when generating doxygen files */
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_BUILTIN_SYNC
#elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_SYNC
#include "opal/sys/sync_builtin/atomic.h"
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_BUILTIN_OSX
#elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_OSX
#include "opal/sys/osx/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_ALPHA
#elif OPAL_ASSEMBLY_ARCH == OPAL_ALPHA
#include "opal/sys/alpha/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_AMD64
#elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64
#include "opal/sys/amd64/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_ARM
#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM
#include "opal/sys/arm/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA32
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32
#include "opal/sys/ia32/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA64
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA64
#include "opal/sys/ia64/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_MIPS
#elif OPAL_ASSEMBLY_ARCH == OPAL_MIPS
#include "opal/sys/mips/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC32
#include "opal/sys/powerpc/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64
#include "opal/sys/powerpc/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_SPARC
#elif OPAL_ASSEMBLY_ARCH == OPAL_SPARC
#include "opal/sys/sparc/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_32
#elif OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_32
#include "opal/sys/sparcv9/atomic.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64
#elif OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64
#include "opal/sys/sparcv9/atomic.h"
#endif
@ -402,7 +402,7 @@ int32_t opal_atomic_sub_32(volatile int32_t *addr, int delta);
#endif /* OPAL_HAVE_ATOMIC_MATH_32 */
#if ! OPAL_HAVE_ATOMIC_MATH_32
/* fix up the value of ompi_have_atomic_math_32 to allow for C versions */
/* fix up the value of opal_have_atomic_math_32 to allow for C versions */
#undef OPAL_HAVE_ATOMIC_MATH_32
#define OPAL_HAVE_ATOMIC_MATH_32 OPAL_HAVE_ATOMIC_CMPSET_32
#endif
@ -433,7 +433,7 @@ int64_t opal_atomic_sub_64(volatile int64_t *addr, int64_t delta);
#endif /* OPAL_HAVE_ATOMIC_MATH_32 */
#if ! OPAL_HAVE_ATOMIC_MATH_64
/* fix up the value of ompi_have_atomic_math_64 to allow for C versions */
/* fix up the value of opal_have_atomic_math_64 to allow for C versions */
#undef OPAL_HAVE_ATOMIC_MATH_64
#define OPAL_HAVE_ATOMIC_MATH_64 OPAL_HAVE_ATOMIC_CMPSET_64
#endif

Просмотреть файл

@ -30,19 +30,19 @@
/* Cross Memory Attach is so far only supported under linux */
#if OPAL_ASSEMBLY_ARCH == OMPI_AMD64
#if OPAL_ASSEMBLY_ARCH == OPAL_AMD64
#define __NR_process_vm_readv 310
#define __NR_process_vm_writev 311
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA32
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32
#define __NR_process_vm_readv 347
#define __NR_process_vm_writev 348
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA64
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA64
#define __NR_process_vm_readv 1332
#define __NR_process_vm_writev 1333
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC32
#define __NR_process_vm_readv 351
#define __NR_process_vm_writev 352
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64
#define __NR_process_vm_readv 351
#define __NR_process_vm_writev 352
#else

Просмотреть файл

@ -17,8 +17,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On ia32, we use cmpxchg.
@ -56,7 +56,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline void opal_atomic_mb(void)
{
@ -75,7 +75,7 @@ static inline void opal_atomic_wmb(void)
MB();
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
/**********************************************************************
@ -83,7 +83,7 @@ static inline void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
int32_t oldval,
@ -100,12 +100,12 @@ static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
return (int)ret;
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_acq_32 opal_atomic_cmpset_32
#define opal_atomic_cmpset_rel_32 opal_atomic_cmpset_32
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#if 0
@ -148,12 +148,12 @@ static inline int opal_atomic_cmpset_64(volatile int64_t *addr,
}
#endif /* if 0 */
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_acq_64 opal_atomic_cmpset_64
#define opal_atomic_cmpset_rel_64 opal_atomic_cmpset_64
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
/**
* atomic_add - add integer to atomic variable
@ -194,6 +194,6 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int i)
return (ret-i);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -16,14 +16,14 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
typedef uint64_t opal_timer_t;
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
@ -43,6 +43,6 @@ opal_timer_t opal_sys_timer_get_cycles(void);
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "atomic.h"
#include "timer.h"

Просмотреть файл

@ -16,8 +16,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On ia64, we use cmpxchg, which supports acquire/release semantics natively.
@ -42,7 +42,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline void opal_atomic_mb(void)
{
@ -62,7 +62,7 @@ static inline void opal_atomic_wmb(void)
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
/**********************************************************************
@ -70,7 +70,7 @@ static inline void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#define ia64_cmpxchg4_acq(ptr, new, old) \
({ \
@ -103,12 +103,12 @@ static inline int opal_atomic_cmpset_rel_32( volatile int32_t *addr,
return ((int32_t)ret == oldval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_32 opal_atomic_cmpset_acq_32
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_acq_64( volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -135,8 +135,8 @@ static inline int opal_atomic_cmpset_rel_64( volatile int64_t *addr,
return (ret == oldval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#define opal_atomic_cmpset_64 opal_atomic_cmpset_acq_64
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -16,14 +16,14 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
typedef uint64_t opal_timer_t;
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
@ -43,6 +43,6 @@ opal_timer_t opal_sys_timer_get_cycles(void);
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -29,7 +29,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "atomic.h"
#include "timer.h"

Просмотреть файл

@ -16,8 +16,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
#if OPAL_WANT_SMP_LOCKS
@ -63,7 +63,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline
void opal_atomic_mb(void)
@ -92,7 +92,7 @@ void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
int32_t oldval, int32_t newval)
@ -199,6 +199,6 @@ static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr,
}
#endif /* OPAL_HAVE_ATOMIC_CMPSET_64 */
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -9,8 +9,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
#include <sys/times.h>
@ -30,4 +30,4 @@ opal_sys_timer_get_cycles(void)
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "../architecture.h"
#include "atomic.h"

Просмотреть файл

@ -20,8 +20,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
#include <libkern/OSAtomic.h>
@ -190,4 +190,4 @@ static inline void opal_atomic_unlock(opal_atomic_lock_t *lock)
OSSpinLockUnlock (&lock->u.lock);
}
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -17,8 +17,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On powerpc ...
@ -57,7 +57,7 @@
#define OPAL_HAVE_ATOMIC_SUB_32 1
#if (OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64) || OPAL_ASM_SUPPORT_64BIT
#if (OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64) || OPAL_ASM_SUPPORT_64BIT
#define OPAL_HAVE_ATOMIC_CMPSET_64 1
#endif
@ -67,7 +67,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline
void opal_atomic_mb(void)
@ -89,7 +89,7 @@ void opal_atomic_wmb(void)
WMB();
}
#elif OPAL_XLC_INLINE_ASSEMBLY /* end OMPI_GCC_INLINE_ASSEMBLY */
#elif OPAL_XLC_INLINE_ASSEMBLY /* end OPAL_GCC_INLINE_ASSEMBLY */
/* Yeah, I don't know who thought this was a reasonable syntax for
* inline assembly. Do these because they are used so often and they
@ -116,7 +116,7 @@ void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#ifdef __xlC__
/* work-around bizzare xlc bug in which it sign-extends
@ -169,12 +169,12 @@ static inline int opal_atomic_cmpset_rel_32(volatile int32_t *addr,
return opal_atomic_cmpset_32(addr, oldval, newval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#if (OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64)
#if (OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64)
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_64(volatile int64_t *addr,
int64_t oldval, int64_t newval)
{
@ -218,16 +218,16 @@ static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr,
return opal_atomic_cmpset_64(addr, oldval, newval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#elif (OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32) && OPAL_ASM_SUPPORT_64BIT
#elif (OPAL_ASSEMBLY_ARCH == OPAL_POWERPC32) && OPAL_ASM_SUPPORT_64BIT
#ifndef ll_low /* GLIBC provides these somewhere, so protect */
#define ll_low(x) *(((unsigned int*)&(x))+0)
#define ll_high(x) *(((unsigned int*)&(x))+1)
#endif
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_64(volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -289,12 +289,12 @@ static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr,
return opal_atomic_cmpset_64(addr, oldval, newval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_ASM_SUPPORT_64BIT */
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int32_t opal_atomic_add_32(volatile int32_t* v, int inc)
{
@ -330,6 +330,6 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int dec)
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -16,14 +16,14 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
typedef uint64_t opal_timer_t;
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
@ -47,6 +47,6 @@ opal_timer_t opal_sys_timer_get_cycles(void);
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -28,7 +28,7 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "../architecture.h"
#include "atomic.h"
@ -36,5 +36,5 @@ cat > $CFILE<<EOF
EOF
gcc -O1 -mpowerpc64 -mcpu=970 -DOPAL_ASSEMBLY_ARCH=POWERPC32 -DOPAL_ASM_SUPPORT_64BIT=1 -I. -S $CFILE -o asm-32-64.s
gcc -O1 -DOPAL_ASSEMBLY_ARCH=OMPI_POWERPC32 -DOPAL_ASM_SUPPORT_64BIT=0 -I. -S $CFILE -o asm-32.s
gcc -m64 -O1 -finline-functions -DOPAL_ASSEMBLY_ARCH=OMPI_POWERPC64 -DOMPI_ASM_SUPPORT64BIT=1 -I. -S $CFILE -o asm-64.s
gcc -O1 -DOPAL_ASSEMBLY_ARCH=OPAL_POWERPC32 -DOPAL_ASM_SUPPORT_64BIT=0 -I. -S $CFILE -o asm-32.s
gcc -m64 -O1 -finline-functions -DOPAL_ASSEMBLY_ARCH=OPAL_POWERPC64 -DOPAL_ASM_SUPPORT64BIT=1 -I. -S $CFILE -o asm-64.s

Просмотреть файл

@ -17,8 +17,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/*
* On sparc v9, use casa and casxa (compare and swap) instructions.
@ -50,7 +50,7 @@
* Memory Barriers
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline void opal_atomic_mb(void)
{
@ -69,7 +69,7 @@ static inline void opal_atomic_wmb(void)
MEMBAR("#StoreStore");
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
/**********************************************************************
@ -77,7 +77,7 @@ static inline void opal_atomic_wmb(void)
* Atomic math operations
*
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
static inline int opal_atomic_cmpset_32( volatile int32_t *addr,
int32_t oldval, int32_t newval)
@ -119,7 +119,7 @@ static inline int opal_atomic_cmpset_rel_32( volatile int32_t *addr,
}
#if OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64
#if OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64
static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -139,7 +139,7 @@ static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
return (ret == oldval);
}
#else /* OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64 */
#else /* OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64 */
static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -167,7 +167,7 @@ static inline int opal_atomic_cmpset_64( volatile int64_t *addr,
return (ret == oldval);
}
#endif /* OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64 */
#endif /* OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64 */
static inline int opal_atomic_cmpset_acq_64( volatile int64_t *addr,
int64_t oldval, int64_t newval)
@ -188,7 +188,7 @@ static inline int opal_atomic_cmpset_rel_64( volatile int64_t *addr,
return opal_atomic_cmpset_64(addr, oldval, newval);
}
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -16,15 +16,15 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1
typedef uint64_t opal_timer_t;
#if OMPI_GCC_INLINE_ASSEMBLY
#if OPAL_GCC_INLINE_ASSEMBLY
#if OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64
#if OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
@ -36,7 +36,7 @@ opal_sys_timer_get_cycles(void)
return ret;
}
#else /* OMPI_SPARCV9_32 */
#else /* OPAL_SPARCV9_32 */
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
@ -62,6 +62,6 @@ opal_sys_timer_get_cycles(void)
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 0
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
#endif /* OPAL_GCC_INLINE_ASSEMBLY */
#endif /* ! OMPI_SYS_ARCH_TIMER_H */
#endif /* ! OPAL_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -29,10 +29,10 @@ cat > $CFILE<<EOF
#include <inttypes.h>
#define static
#define inline
#define OMPI_GCC_INLINE_ASSEMBLY 1
#define OPAL_GCC_INLINE_ASSEMBLY 1
#define OPAL_WANT_SMP_LOCKS 1
#include "atomic.h"
EOF
gcc -m64 -O3 -DOPAL_ASSEMBLY_ARCH=OMPI_SPARCV9_64 -I. -S $CFILE -o atomic64.s
gcc -mv8plus -DOPAL_ASSEMBLY_ARCH=OMPI_SPARCV9_32 -O3 -I. -S $CFILE -o atomic32.s
gcc -m64 -O3 -DOPAL_ASSEMBLY_ARCH=OPAL_SPARCV9_64 -I. -S $CFILE -o atomic64.s
gcc -mv8plus -DOPAL_ASSEMBLY_ARCH=OPAL_SPARCV9_32 -O3 -I. -S $CFILE -o atomic32.s

Просмотреть файл

@ -17,8 +17,8 @@
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_ATOMIC_H
#define OMPI_SYS_ARCH_ATOMIC_H 1
#ifndef OPAL_SYS_ARCH_ATOMIC_H
#define OPAL_SYS_ARCH_ATOMIC_H 1
/**********************************************************************
*
@ -119,4 +119,4 @@ static inline int64_t opal_atomic_sub_64(volatile int64_t *addr, int64_t delta)
return __sync_sub_and_fetch(addr, delta);
}
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */

Просмотреть файл

@ -35,31 +35,31 @@
/* do some quick #define cleanup in cases where we are doing
testing... */
#ifdef OMPI_DISABLE_INLINE_ASM
#ifdef OPAL_DISABLE_INLINE_ASM
#undef OPAL_C_GCC_INLINE_ASSEMBLY
#define OPAL_C_GCC_INLINE_ASSEMBLY 0
#undef OMPI_CXX_GCC_INLINE_ASSEMBLY
#define OMPI_CXX_GCC_INLINE_ASSEMBLY 0
#undef OPAL_CXX_GCC_INLINE_ASSEMBLY
#define OPAL_CXX_GCC_INLINE_ASSEMBLY 0
#undef OPAL_C_DEC_INLINE_ASSEMBLY
#define OPAL_C_DEC_INLINE_ASSEMBLY 0
#undef OMPI_CXX_DEC_INLINE_ASSEMBLY
#define OMPI_CXX_DEC_INLINE_ASSEMBLY 0
#undef OPAL_CXX_DEC_INLINE_ASSEMBLY
#define OPAL_CXX_DEC_INLINE_ASSEMBLY 0
#undef OPAL_C_XLC_INLINE_ASSEMBLY
#define OPAL_C_XLC_INLINE_ASSEMBLY 0
#undef OMPI_CXX_XLC_INLINE_ASSEMBLY
#define OMPI_CXX_XLC_INLINE_ASSEMBLY 0
#undef OPAL_CXX_XLC_INLINE_ASSEMBLY
#define OPAL_CXX_XLC_INLINE_ASSEMBLY 0
#endif
/* define OMPI_{GCC,DEC,XLC}_INLINE_ASSEMBLY based on the
OMPI_{C,CXX}_{GCC,DEC,XLC}_INLINE_ASSEMBLY defines and whether we
/* define OPAL_{GCC,DEC,XLC}_INLINE_ASSEMBLY based on the
OPAL_{C,CXX}_{GCC,DEC,XLC}_INLINE_ASSEMBLY defines and whether we
are in C or C++ */
#if defined(c_plusplus) || defined(__cplusplus)
#define OMPI_GCC_INLINE_ASSEMBLY OMPI_CXX_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OMPI_CXX_DEC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OMPI_CXX_XLC_INLINE_ASSEMBLY
#define OPAL_GCC_INLINE_ASSEMBLY OPAL_CXX_GCC_INLINE_ASSEMBLY
#define OPAL_DEC_INLINE_ASSEMBLY OPAL_CXX_DEC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OPAL_CXX_XLC_INLINE_ASSEMBLY
#else
#define OMPI_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OPAL_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OPAL_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#endif
@ -77,23 +77,23 @@ BEGIN_C_DECLS
#if defined(DOXYGEN)
/* don't include system-level gorp when generating doxygen files */
#elif OPAL_ASSEMBLY_ARCH == OMPI_AMD64
#elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64
#include "opal/sys/amd64/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_ARM
#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM
#include "opal/sys/arm/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA32
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32
#include "opal/sys/ia32/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_IA64
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA64
#include "opal/sys/ia64/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC32
#include "opal/sys/powerpc/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64
#elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64
#include "opal/sys/powerpc/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_32
#elif OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_32
#include "opal/sys/sparcv9/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_SPARCV9_64
#elif OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64
#include "opal/sys/sparcv9/timer.h"
#elif OPAL_ASSEMBLY_ARCH == OMPI_MIPS
#elif OPAL_ASSEMBLY_ARCH == OPAL_MIPS
#include "opal/sys/mips/timer.h"
#endif