OpenMPI  0.1.1
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"
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 
31  vprotocol_pessimist_clock_t reqid; /* recv request post "clock" */
32  int src; /* matched src */
34 
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- */
39 
44 
47  vprotocol_pessimist_event_type_t type;
51 
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__ */
Definition: vprotocol_pessimist_event.h:35
This file presents the MCA parameter interface.
Definition: vprotocol_pessimist_event.h:40
Definition: vprotocol_pessimist_event.h:45
Definition: vprotocol_pessimist_event.h:30
Definition: ompi_free_list.h:62
Type of request.
Definition: pml_base_request.h:57
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236