OpenMPI 0.1.1

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

- File List
- Globals

base.h
1 /*
2 * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
3 * $COPYRIGHT$
4 *
5 * Additional copyrights may follow
6 *
7 * $HEADER$
8 */
9
10 #ifndef OPAL_EVENT_BASE_H
11 #define OPAL_EVENT_BASE_H
12
13 #include "opal_config.h"
14
15 #include "opal/mca/event/event.h"
16
17 /*
18 * Global functions for MCA overall event open and close
19 */
20
21 BEGIN_C_DECLS
22
23 extern int opal_event_base_inited;
24
25 /**
26 * Initialize the event MCA framework
27 *
28 * @retval OPAL_SUCCESS Upon success
29 * @retval OPAL_ERROR Upon failure
30 *
31 * This must be the first function invoked in the event MCA
32 * framework. It initializes the event MCA framework, finds
33 * and opens event components, etc.
34 *
35 * This function is invoked during opal_init().
36 *
37 * This function fills in the internal global variable
38 * opal_event_base_components_opened, which is a list of all
39 * event components that were successfully opened. This
40 * variable should \em only be used by other event base
41 * functions -- it is not considered a public interface member --
42 * and is only mentioned here for completeness.
43 */
44 OPAL_DECLSPEC int opal_event_base_open(void);
45
46 /**
47 * Select an available component.
48 *
49 * @return OPAL_SUCCESS Upon success.
50 * @return OPAL_NOT_FOUND If no component can be selected.
51 * @return OPAL_ERROR Upon other failure.
52 *
53 * This function invokes the selection process for event components,
54 * which works as follows:
55 *
56 * - If the \em event MCA parameter is not specified, the
57 * selection set is all available event components.
58 * - If the \em event MCA parameter is specified, the
59 * selection set is just that component.
60 * - All components in the selection set are queried to see if
61 * they want to run. All components that want to run are ranked
62 * by their priority and the highest priority component is
63 * selected. All non-selected components have their "close"
64 * function invoked to let them know that they were not selected.
65 * - The selected component will have its "init" function invoked to
66 * let it know that it was selected.
67 *
68 * If we fall through this entire process and no component is
69 * selected, then return OPAL_NOT_FOUND (this is not a fatal
70 * error).
71 *
72 * At the end of this process, we'll either have a single
73 * component that is selected and initialized, or no component was
74 * selected. If no component was selected, subsequent invocation
75 * of the event wrapper functions will return an error.
76 */
77 OPAL_DECLSPEC int opal_event_base_select(void);
78
79 /**
80 * Shut down the event MCA framework.
81 *
82 * @retval OPAL_SUCCESS Always
83 *
84 * This function shuts down everything in the event MCA
85 * framework, and is called during opal_finalize().
86 *
87 * It must be the last function invoked on the event MCA
88 * framework.
89 */
90 OPAL_DECLSPEC int opal_event_base_close(void);
91
92 /**
93 * Debugging output stream
94 */
95 OPAL_DECLSPEC extern int opal_event_base_output;
96 OPAL_DECLSPEC extern opal_list_t opal_event_components;
97
98
99 END_C_DECLS
100
101 #endif /* OPAL_BASE_EVENT_H */
opal_list_t
Definition: opal_list.h:147