OpenMPI  0.1.1
osc_pt2pt_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$
11  *
12  * Additional copyrights may follow
13  *
14  * $HEADER$
15  */
16 
17 #ifndef OSC_PT2PT_LONGREQ_H
18 #define OSC_PT2PT_LONGREQ_H
19 
20 #include "opal/class/opal_free_list.h"
21 
22 #include "osc_pt2pt.h"
23 
26 
27  struct ompi_request_t *req_pml_request; /* PML request */
28 
29  union {
30  struct ompi_osc_pt2pt_sendreq_t *req_sendreq;
31  struct ompi_osc_pt2pt_replyreq_t *req_replyreq;
32  struct ompi_osc_pt2pt_send_header_t *req_sendhdr;
33  } req_basereq;
34 
35  /* This may not always be filled in... */
36  struct ompi_osc_pt2pt_module_t *req_module;
37  struct ompi_op_t *req_op;
38  struct ompi_datatype_t *req_datatype;
39 };
42 
43 static inline int
44 ompi_osc_pt2pt_longreq_alloc(ompi_osc_pt2pt_longreq_t **longreq)
45 {
47  int ret;
48 
49  OPAL_FREE_LIST_GET(&mca_osc_pt2pt_component.p2p_c_longreqs,
50  item, ret);
51 
52  *longreq = (ompi_osc_pt2pt_longreq_t*) item;
53  return ret;
54 }
55 
56 static inline int
57 ompi_osc_pt2pt_longreq_free(ompi_osc_pt2pt_longreq_t *longreq)
58 {
59  OPAL_FREE_LIST_RETURN(&mca_osc_pt2pt_component.p2p_c_longreqs,
60  &longreq->super);
61  return OMPI_SUCCESS;
62 }
63 
64 #endif
Definition: osc_pt2pt_longreq.h:24
Definition: osc_pt2pt_header.h:53
Definition: ompi_datatype.h:68
Definition: osc_pt2pt.h:57
Definition: opal_free_list.h:47
Definition: osc_pt2pt_sendreq.h:38
Definition: osc_pt2pt_replyreq.h:33
opal_free_list_t p2p_c_longreqs
free list of ompi_osc_pt2pt_longreq_t structures
Definition: osc_pt2pt.h:50
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