OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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
29 struct ompi_osc_rdma_longreq_t {
30 opal_free_list_item_t super;
31 ompi_request_t *request;
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 };
46 typedef struct ompi_osc_rdma_longreq_t ompi_osc_rdma_longreq_t;
47 OBJ_CLASS_DECLARATION(ompi_osc_rdma_longreq_t);
48
49 static inline int
50 ompi_osc_rdma_longreq_alloc(ompi_osc_rdma_longreq_t **longreq)
51 {
52 opal_free_list_item_t *item;
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
ompi_osc_rdma_replyreq_t
Definition: osc_rdma_replyreq.h:34
ompi_osc_rdma_module_t
Definition: osc_rdma.h:111
ompi_datatype_t
Definition: ompi_datatype.h:68
ompi_osc_rdma_send_header_t
Definition: osc_rdma_header.h:58
ompi_osc_rdma_component_t::c_longreqs
opal_free_list_t c_longreqs
free list of ompi_osc_rdma_longreq_t structures
Definition: osc_rdma.h:68
opal_free_list_item_t
Definition: opal_free_list.h:47
op.h
Public interface for the MPI_Op handle.
request.h
Top-level description of requests.
ompi_osc_rdma_sendreq_t
Definition: osc_rdma_sendreq.h:40
ompi_osc_rdma_longreq_t
Definition: osc_rdma_longreq.h:29
request
Definition: evdns.c:158
ompi_request_t
Main top-level request struct definition.
Definition: request.h:100
ompi_op_t
Back-end type of MPI_Op.
Definition: op.h:100
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236