root/oshmem/mca/atomic/basic/atomic_basic.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2013      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 #ifndef MCA_ATOMIC_BASIC_H
  12 #define MCA_ATOMIC_BASIC_H
  13 
  14 #include "oshmem_config.h"
  15 
  16 #include "oshmem/mca/mca.h"
  17 #include "oshmem/mca/atomic/atomic.h"
  18 #include "oshmem/util/oshmem_util.h"
  19 
  20 BEGIN_C_DECLS
  21 
  22 #define MCA_BASIC_OP(size, op4, op8) ((size == sizeof(uint64_t)) ? (op8) : (op4))
  23 
  24 /* Globally exported variables */
  25 
  26 OSHMEM_MODULE_DECLSPEC extern mca_atomic_base_component_1_0_0_t
  27 mca_atomic_basic_component;
  28 
  29 OSHMEM_DECLSPEC void atomic_basic_lock(shmem_ctx_t ctx, int pe);
  30 OSHMEM_DECLSPEC void atomic_basic_unlock(shmem_ctx_t ctx, int pe);
  31 
  32 /* API functions */
  33 
  34 int mca_atomic_basic_startup(bool enable_progress_threads, bool enable_threads);
  35 int mca_atomic_basic_finalize(void);
  36 mca_atomic_base_module_t*
  37 mca_atomic_basic_query(int *priority);
  38 
  39 int mca_atomic_basic_cswap(shmem_ctx_t ctx,
  40                            void *target,
  41                            uint64_t *prev,
  42                            uint64_t cond,
  43                            uint64_t value,
  44                            size_t size,
  45                            int pe);
  46 
  47 struct mca_atomic_basic_module_t {
  48     mca_atomic_base_module_t super;
  49 };
  50 typedef struct mca_atomic_basic_module_t mca_atomic_basic_module_t;
  51 OBJ_CLASS_DECLARATION(mca_atomic_basic_module_t);
  52 
  53 END_C_DECLS
  54 
  55 #endif /* MCA_ATOMIC_BASIC_H */

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