diff --git a/opal/include/opal/sys/arm64/atomic.h b/opal/include/opal/sys/arm64/atomic.h index 2f7f7d32aac..854009cda62 100644 --- a/opal/include/opal/sys/arm64/atomic.h +++ b/opal/include/opal/sys/arm64/atomic.h @@ -14,6 +14,8 @@ * Copyright (c) 2010 ARM ltd. All rights reserved. * Copyright (c) 2016 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -50,22 +52,22 @@ * *********************************************************************/ -static inline void opal_atomic_mb (void) +static inline void opal_atomic_mb () { MB(); } -static inline void opal_atomic_rmb (void) +static inline void opal_atomic_rmb () { RMB(); } -static inline void opal_atomic_wmb (void) +static inline void opal_atomic_wmb () { WMB(); } -static inline void opal_atomic_isync (void) +static inline void opal_atomic_isync () { __asm__ __volatile__ ("isb"); } diff --git a/opal/include/opal/sys/gcc_builtin/atomic.h b/opal/include/opal/sys/gcc_builtin/atomic.h index 35543119245..fbc76915d7e 100644 --- a/opal/include/opal/sys/gcc_builtin/atomic.h +++ b/opal/include/opal/sys/gcc_builtin/atomic.h @@ -46,17 +46,17 @@ #define OPAL_HAVE_ATOMIC_SWAP_64 1 -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { __atomic_thread_fence (__ATOMIC_SEQ_CST); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { __atomic_thread_fence (__ATOMIC_ACQUIRE); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { __atomic_thread_fence (__ATOMIC_RELEASE); } diff --git a/opal/include/opal/sys/ia32/atomic.h b/opal/include/opal/sys/ia32/atomic.h index 2a053849eb9..e2bcf31cb3f 100644 --- a/opal/include/opal/sys/ia32/atomic.h +++ b/opal/include/opal/sys/ia32/atomic.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007-2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. @@ -58,24 +58,24 @@ *********************************************************************/ #if OPAL_GCC_INLINE_ASSEMBLY -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { MB(); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { MB(); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { MB(); } -static inline void opal_atomic_isync(void) +static inline void opal_atomic_isync() { } diff --git a/opal/include/opal/sys/ia64/atomic.h b/opal/include/opal/sys/ia64/atomic.h index cd77c5214c3..9f282c66f5b 100644 --- a/opal/include/opal/sys/ia64/atomic.h +++ b/opal/include/opal/sys/ia64/atomic.h @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2017 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -44,24 +46,24 @@ *********************************************************************/ #if OPAL_GCC_INLINE_ASSEMBLY -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { MB(); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { MB(); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { MB(); } -static inline void opal_atomic_isync(void) +static inline void opal_atomic_isync() { } diff --git a/opal/include/opal/sys/sparcv9/atomic.h b/opal/include/opal/sys/sparcv9/atomic.h index da6821f0183..447ca66c4c6 100644 --- a/opal/include/opal/sys/sparcv9/atomic.h +++ b/opal/include/opal/sys/sparcv9/atomic.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserverd. - * Copyright (c) 2016 Research Organization for Information Science + * Copyright (c) 2016-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -50,24 +50,24 @@ *********************************************************************/ #if OPAL_GCC_INLINE_ASSEMBLY -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { MEMBAR("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad"); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { MEMBAR("#LoadLoad"); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { MEMBAR("#StoreStore"); } -static inline void opal_atomic_isync(void) +static inline void opal_atomic_isync() { } diff --git a/opal/include/opal/sys/sync_builtin/atomic.h b/opal/include/opal/sys/sync_builtin/atomic.h index 0f18039ff66..b52e82f3642 100644 --- a/opal/include/opal/sys/sync_builtin/atomic.h +++ b/opal/include/opal/sys/sync_builtin/atomic.h @@ -13,6 +13,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,17 +32,17 @@ *********************************************************************/ #define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { __sync_synchronize(); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { __sync_synchronize(); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { __sync_synchronize(); } diff --git a/opal/include/opal/sys/timer.h b/opal/include/opal/sys/timer.h index 014903dbe01..e6e44d9de99 100644 --- a/opal/include/opal/sys/timer.h +++ b/opal/include/opal/sys/timer.h @@ -13,6 +13,8 @@ * Copyright (c) 2016 Broadcom Limited. All rights reserved. * Copyright (c) 2016 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -118,7 +120,7 @@ typedef long opal_timer_t; #define OPAL_HAVE_SYS_TIMER_IS_MONOTONIC 1 -static inline bool opal_sys_timer_is_monotonic (void) +static inline bool opal_sys_timer_is_monotonic () { return OPAL_TIMER_MONOTONIC; } diff --git a/opal/include/opal/sys/x86_64/atomic.h b/opal/include/opal/sys/x86_64/atomic.h index ae0bbbbc0bc..c8494f1da1a 100644 --- a/opal/include/opal/sys/x86_64/atomic.h +++ b/opal/include/opal/sys/x86_64/atomic.h @@ -51,24 +51,24 @@ *********************************************************************/ #if OPAL_GCC_INLINE_ASSEMBLY -static inline void opal_atomic_mb(void) +static inline void opal_atomic_mb() { MB(); } -static inline void opal_atomic_rmb(void) +static inline void opal_atomic_rmb() { MB(); } -static inline void opal_atomic_wmb(void) +static inline void opal_atomic_wmb() { MB(); } -static inline void opal_atomic_isync(void) +static inline void opal_atomic_isync() { } diff --git a/opal/include/opal/sys/x86_64/timer.h b/opal/include/opal/sys/x86_64/timer.h index a367f772e75..2b8f3e53798 100644 --- a/opal/include/opal/sys/x86_64/timer.h +++ b/opal/include/opal/sys/x86_64/timer.h @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2016 Los Alamos National Security, LLC. ALl rights * reserved. + * Copyright (c) 2017 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -42,7 +44,7 @@ opal_sys_timer_get_cycles(void) return ((opal_timer_t)l) | (((opal_timer_t)h) << 32); } -static inline bool opal_sys_timer_is_monotonic (void) +static inline bool opal_sys_timer_is_monotonic () { int64_t tmp; int32_t cpuid1, cpuid2;