Merge branch 'release-4-6'
[alexxy/gromacs.git] / src / gromacs / legacyheaders / thread_mpi / atomic / gcc_spinlock.h
index f7dbc67d7ad91fb440094d28fa5fe292aa8659bc..84a244d9004bbe700c37257c19c1279dadeb1430 100644 (file)
 
 typedef struct tMPI_Spinlock
 {
-    volatile unsigned int  lock /*__attribute__ ((aligned(64)))*/;
+    volatile unsigned int lock /*__attribute__ ((aligned(64)))*/;
 } tMPI_Spinlock_t;
 
-
-
-
 #define TMPI_SPINLOCK_INITIALIZER   { 0 }
 
+#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
+
 
 
 static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
@@ -83,18 +82,18 @@ static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
 }
 
 
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *  x)
+static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
 {
     __sync_lock_release(&(x->lock));
 }
 
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *  x)
+static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
 {
     __sync_synchronize();
     return ( x->lock == 1 );
 }
 
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *   x)
+static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
 {
     do
     {