1
1
openmpi/opal/mca/event/base/event_base_open.c
Ralph Castain 9ea2b196ce Convert the opal_event framework to use direct function calls instead of hiding functions behind function pointers. Eliminate the opal_object_t abstraction of libevent's event struct so it can be directly passed to the libevent functions.
Note: the ompi_check_libfca.m4 file had to be modified to avoid it stomping on global CPPFLAGS and the like. The file was also relocated to the ompi/config directory as it pertains solely to an ompi-layer component.

Forgive the mid-day configure change, but I know Shiqing is working the windows issues and don't want to cause him unnecessary redo work.

This commit was SVN r23966.
2010-10-28 15:22:46 +00:00

76 строки
1.8 KiB
C

/*
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "opal_config.h"
#include "opal/constants.h"
#include "opal/util/output.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/mca/event/event.h"
#include "opal/mca/event/base/base.h"
/*
* The following file was created by configure. It contains extern
* statements and the definition of an array of pointers to each
* component's public mca_base_component_t struct.
*/
#include "opal/mca/event/base/static-components.h"
/*
* Globals
*/
int opal_event_base_output = -1;
opal_list_t opal_event_components;
opal_event_base_t *opal_event_base=NULL;
int opal_event_base_open(void)
{
int value, rc = OPAL_SUCCESS;
/* Debugging / verbose output */
mca_base_param_reg_int_name("event", "base_verbose",
"Verbosity level of the event framework",
false, false,
0, &value);
if (0 != value) {
opal_event_base_output = opal_output_open(NULL);
} else {
opal_event_base_output = -1;
}
/* to support tools such as ompi_info, add the components
* to a list
*/
OBJ_CONSTRUCT(&opal_event_components, opal_list_t);
if (OPAL_SUCCESS !=
mca_base_components_open("event", 0,
mca_event_base_static_components,
&opal_event_components, true)) {
return OPAL_ERROR;
}
/* init the lib */
if (OPAL_SUCCESS != (rc = opal_event_init())) {
return rc;
}
/* get our event base */
if (NULL == (opal_event_base = opal_event_base_create())) {
rc = OPAL_ERROR;
}
return rc;
}