1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
4 * reserved.
5 * Copyright (c) 2018 Intel, Inc, All rights reserved
6 *
7 * $COPYRIGHT$
8 *
9 * Additional copyrights may follow
10 *
11 * $HEADER$
12 */
13
14 #ifndef BTL_OFI_RDMA_H
15 #define BTL_OFI_RDMA_H
16
17 #include "opal/threads/thread_usage.h"
18
19 #include "btl_ofi.h"
20 #include "btl_ofi_endpoint.h"
21
22 mca_btl_ofi_rdma_completion_t *mca_btl_ofi_rdma_completion_alloc (
23 mca_btl_base_module_t *btl,
24 mca_btl_base_endpoint_t *endpoint,
25 mca_btl_ofi_context_t *ofi_context,
26 void *local_address,
27 mca_btl_base_registration_handle_t *local_handle,
28 mca_btl_base_rdma_completion_fn_t cbfunc,
29 void *cbcontext, void *cbdata,
30 int type);
31
32 #define MCA_BTL_OFI_NUM_RDMA_INC(module) \
33 OPAL_THREAD_ADD_FETCH64(&(module)->outstanding_rdma, 1); \
34 if (module->outstanding_rdma > mca_btl_ofi_component.progress_threshold){ \
35 mca_btl_ofi_component.super.btl_progress(); \
36 }
37
38 #define MCA_BTL_OFI_NUM_RDMA_DEC(module) \
39 OPAL_THREAD_ADD_FETCH64(&(module)->outstanding_rdma, -1);
40
41 #endif /* !defined(BTL_OFI_RDMA_H) */
42