root/test/asm/atomic_barrier.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 
  20 #define OMPI_BUILDING 0
  21 #include "opal_config.h"
  22 
  23 #include "opal/sys/atomic.h"
  24 
  25 int
  26 main(int argc, char *argv[])
  27 {
  28 #if OPAL_HAVE_ATOMIC_MEM_BARRIER
  29 
  30     /* there really isn't a great way to test that the barriers
  31        actually barrier, but at least make sure they don't kill the
  32        machine.*/
  33 
  34     opal_atomic_mb();
  35     opal_atomic_rmb();
  36     opal_atomic_wmb();
  37 
  38     return 0;
  39 #else
  40     return 77;
  41 #endif
  42 }
  43 

/* [<][>][^][v][top][bottom][index][help] */