OpenMPI  0.1.1
osc_rdma_longreq.h
1 /*
2  * Copyright (c) 2004-2005 The Trustees of Indiana University.
3  * All rights reserved.
4  * Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
5  * All rights reserved.
6  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
7  * University of Stuttgart. All rights reserved.
8  * Copyright (c) 2004-2005 The Regents of the University of California.
9  * All rights reserved.
10  * Copyright (c) 2007 Los Alamos National Security, LLC. All rights
11  * reserved.
12  * $COPYRIGHT$
13  *
14  * Additional copyrights may follow
15  *
16  * $HEADER$
17  */
18 
19 #ifndef OSC_RDMA_LONGREQ_H
20 #define OSC_RDMA_LONGREQ_H
21 
22 #include "osc_rdma.h"
23 
24 #include "opal/class/opal_free_list.h"
25 #include "ompi/datatype/ompi_datatype.h"
26 #include "ompi/request/request.h"
27 #include "ompi/op/op.h"
28 
32 
33  union {
34  struct ompi_osc_rdma_sendreq_t *req_sendreq;
35  struct ompi_osc_rdma_replyreq_t *req_replyreq;
36  struct ompi_osc_rdma_send_header_t *req_sendhdr;
37  } req_basereq;
38 
39  /* warning - this doesn't always have a sane value */
40  ompi_osc_rdma_module_t *req_module;
41 
42  /* for long receives, to avoid a longrecvreq type */
43  struct ompi_op_t *req_op;
44  struct ompi_datatype_t *req_datatype;
45 };
48 
49 static inline int
50 ompi_osc_rdma_longreq_alloc(ompi_osc_rdma_longreq_t **longreq)
51 {
53  int ret;
54 
55  OPAL_FREE_LIST_GET(&mca_osc_rdma_component.c_longreqs,
56  item, ret);
57 
58  *longreq = (ompi_osc_rdma_longreq_t*) item;
59  return ret;
60 }
61 
62 static inline int
63 ompi_osc_rdma_longreq_free(ompi_osc_rdma_longreq_t *longreq)
64 {
65  OPAL_FREE_LIST_RETURN(&mca_osc_rdma_component.c_longreqs,
66  &longreq->super.super);
67  return OMPI_SUCCESS;
68 }
69 
70 #endif
Definition: osc_rdma_replyreq.h:34
Definition: osc_rdma.h:111
Definition: ompi_datatype.h:68
Definition: osc_rdma_header.h:58
opal_free_list_t c_longreqs
free list of ompi_osc_rdma_longreq_t structures
Definition: osc_rdma.h:68
Definition: opal_free_list.h:47
Public interface for the MPI_Op handle.
Top-level description of requests.
Definition: osc_rdma_sendreq.h:40
Definition: osc_rdma_longreq.h:29
Definition: evdns.c:158
Main top-level request struct definition.
Definition: request.h:100
Back-end type of MPI_Op.
Definition: op.h:100
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236