Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions opal/include/opal/sys/arm64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
}
Expand Down
6 changes: 3 additions & 3 deletions opal/include/opal/sys/gcc_builtin/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
10 changes: 5 additions & 5 deletions opal/include/opal/sys/ia32/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
{
}

Expand Down
10 changes: 6 additions & 4 deletions opal/include/opal/sys/ia64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
{
}

Expand Down
10 changes: 5 additions & 5 deletions opal/include/opal/sys/sparcv9/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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$
*
Expand Down Expand Up @@ -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()
{
}

Expand Down
8 changes: 5 additions & 3 deletions opal/include/opal/sys/sync_builtin/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
}
Expand Down
4 changes: 3 additions & 1 deletion opal/include/opal/sys/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions opal/include/opal/sys/x86_64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
}

Expand Down
4 changes: 3 additions & 1 deletion opal/include/opal/sys/x86_64/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down