This source file includes following definitions.
- opal_event_base_create
- opal_event_init
- opal_event_finalize
- opal_event_alloc
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 #include "opal_config.h"
  12 #include "opal/constants.h"
  13 #include "opal/util/output.h"
  14 
  15 #include "opal/mca/event/base/base.h"
  16 #include "external.h"
  17 
  18 #include "opal/util/argv.h"
  19 
  20 extern char *ompi_event_module_include;
  21 static struct event_config *config = NULL;
  22 
  23 opal_event_base_t* opal_event_base_create(void)
  24 {
  25     opal_event_base_t *base;
  26 
  27     base = event_base_new_with_config(config);
  28     if (NULL == base) {
  29         
  30         opal_output(0, "No event method available");
  31     }
  32     return base;
  33 }
  34 
  35 int opal_event_init(void)
  36 {
  37     const char **all_available_eventops = NULL;
  38     char **includes=NULL;
  39     bool dumpit=false;
  40     int i, j;
  41 
  42     if (opal_output_get_verbosity(opal_event_base_framework.framework_output) > 4) {
  43         event_enable_debug_mode();
  44     }
  45 
  46     all_available_eventops = event_get_supported_methods();
  47 
  48     if (NULL == ompi_event_module_include) {
  49         
  50         ompi_event_module_include = strdup("select");
  51     }
  52     includes = opal_argv_split(ompi_event_module_include,',');
  53 
  54     
  55     config = event_config_new();
  56     
  57     for (i = 0 ; NULL != all_available_eventops[i] ; ++i) {
  58         
  59 
  60 
  61         dumpit = true;
  62         for (j=0; NULL != includes[j]; j++) {
  63             if (0 == strcmp("all", includes[j]) ||
  64                 0 == strcmp(all_available_eventops[i], includes[j])) {
  65                 dumpit = false;
  66                 break;
  67             }
  68         }
  69         if (dumpit) {
  70             event_config_avoid_method(config, all_available_eventops[i]);
  71         }
  72     }
  73     opal_argv_free(includes);
  74 
  75     return OPAL_SUCCESS;
  76 }
  77 
  78 int opal_event_finalize(void)
  79 {
  80     return OPAL_SUCCESS;
  81 }
  82 
  83 opal_event_t* opal_event_alloc(void)
  84 {
  85     opal_event_t *ev;
  86 
  87     ev = (opal_event_t*)malloc(sizeof(opal_event_t));
  88     return ev;
  89 }