OpenMPI 0.1.1

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

- File List
- Globals

vprotocol_pessimist_event.h
1 /*
2 * Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
3 * All rights reserved.
4 * $COPYRIGHT$
5 *
6 * Additional copyrights may follow
7 *
8 * $HEADER$
9 */
10
11 #include "ompi_config.h"
12 #include "opal/mca/base/mca_base_param.h"
13 #include "ompi/mca/pml/base/pml_base_request.h"
14 #include "opal_stdint.h"
15
16 #ifndef __INCLUDE_VPROTOCOL_PESSIMIST_EVENT_H__
17 #define __INCLUDE_VPROTOCOL_PESSIMIST_EVENT_H__
18
19 BEGIN_C_DECLS
20
21 /* Make sure -Wformat is happy... */
22 typedef uint64_t vprotocol_pessimist_clock_t;
23 #define PRIpclock PRIx64
24
25 typedef enum {
26 VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING,
27 VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY
28 } vprotocol_pessimist_event_type_t;
29
30 typedef struct vprotocol_pessimist_matching_event_t {
31 vprotocol_pessimist_clock_t reqid; /* recv request post "clock" */
32 int src; /* matched src */
33 } vprotocol_pessimist_matching_event_t;
34
35 typedef struct vprotocol_pessimist_delivery_event_t {
36 vprotocol_pessimist_clock_t probeid; /* operation "clock" (for waits, tests, probes) */
37 vprotocol_pessimist_clock_t reqid; /* delivered request (recv or send) -TODO: SUPPORT FOR WaitSome/TestSome- */
38 } vprotocol_pessimist_delivery_event_t;
39
40 typedef union vprotocol_pessimist_mem_event_t {
41 vprotocol_pessimist_matching_event_t e_matching;
42 vprotocol_pessimist_delivery_event_t e_delivery;
43 } vprotocol_pessimist_mem_event_t;
44
45 typedef struct mca_vprotocol_pessimist_event_t {
46 ompi_free_list_item_t super;
47 vprotocol_pessimist_event_type_t type;
48 mca_pml_base_request_t *req;
49 vprotocol_pessimist_mem_event_t u_event;
50 } mca_vprotocol_pessimist_event_t;
51
52 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_event_t);
53
54
55 #define VPESSIMIST_MATCHING_EVENT_NEW(event) do { \
56 ompi_free_list_item_t *item; \
57 int rc; \
58 OMPI_FREE_LIST_WAIT(&mca_vprotocol_pessimist.events_pool, item, rc); \
59 event = (mca_vprotocol_pessimist_event_t *) item; \
60 event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING; \
61 event->u_event.e_matching.src = -1; \
62 } while(0)
63
64 #define VPESSIMIST_DELIVERY_EVENT_NEW(event) do { \
65 ompi_free_list_item_t *item; \
66 int rc; \
67 OMPI_FREE_LIST_WAIT(&mca_vprotocol_pessimist.events_pool, item, rc); \
68 event = (mca_vprotocol_pessimist_event_t *) item; \
69 event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY; \
70 } while(0)
71
72 #define VPESSIMIST_EVENT_RETURN(event) \
73 OMPI_FREE_LIST_RETURN(&mca_vprotocol_pessimist.events_pool, \
74 (ompi_free_list_item_t *) event)
75
76 END_C_DECLS
77
78 #endif /* INCLUDE_VPROTOCOL_PESSIMIST_EVENT_H__ */
vprotocol_pessimist_delivery_event_t
Definition: vprotocol_pessimist_event.h:35
mca_base_param.h
This file presents the MCA parameter interface.
vprotocol_pessimist_mem_event_t
Definition: vprotocol_pessimist_event.h:40
pml_base_request.h
mca_vprotocol_pessimist_event_t
Definition: vprotocol_pessimist_event.h:45
vprotocol_pessimist_matching_event_t
Definition: vprotocol_pessimist_event.h:30
ompi_free_list_item_t
Definition: ompi_free_list.h:62
mca_pml_base_request_t
Type of request.
Definition: pml_base_request.h:57
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236