This source file includes following definitions.
- component_map_construct
- component_map_destruct
- orte_info_components_open
- orte_info_components_close
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 #include "orte_config.h"
  26 
  27 #include <stdlib.h>
  28 #include <string.h>
  29 
  30 #include "orte/runtime/runtime.h"
  31 
  32 #include "opal/util/argv.h"
  33 #include "opal/runtime/opal_info_support.h"
  34 #include "opal/mca/event/base/base.h"
  35 #include "opal/util/output.h"
  36 
  37 #include "orte/runtime/orte_info_support.h"
  38 #include "orte/tools/orte-info/orte-info.h"
  39 
  40 
  41 
  42 
  43 static void component_map_construct(orte_info_component_map_t *map)
  44 {
  45     map->type = NULL;
  46 }
  47 static void component_map_destruct(orte_info_component_map_t *map)
  48 {
  49     if (NULL != map->type) {
  50         free(map->type);
  51     }
  52     
  53 
  54 
  55 }
  56 OBJ_CLASS_INSTANCE(orte_info_component_map_t,
  57                    opal_list_item_t,
  58                    component_map_construct,
  59                    component_map_destruct);
  60 
  61 opal_pointer_array_t orte_component_map = {{0}};
  62 
  63 
  64 
  65 
  66 
  67 static bool opened_components = false;
  68 
  69 
  70 void orte_info_components_open(void)
  71 {
  72     if (opened_components) {
  73         return;
  74     }
  75 
  76     opened_components = true;
  77 
  78     
  79     OBJ_CONSTRUCT(&orte_component_map, opal_pointer_array_t);
  80     opal_pointer_array_init(&orte_component_map, 256, INT_MAX, 128);
  81 
  82     opal_info_register_framework_params(&orte_component_map);
  83     orte_info_register_framework_params(&orte_component_map);
  84 }
  85 
  86 
  87 
  88 
  89 void orte_info_components_close(void)
  90 {
  91     int i;
  92     orte_info_component_map_t *map;
  93 
  94     if (!opened_components) {
  95         return;
  96     }
  97 
  98     orte_info_close_components ();
  99     opal_info_close_components ();
 100 
 101     for (i=0; i < orte_component_map.size; i++) {
 102         if (NULL != (map = (orte_info_component_map_t*)opal_pointer_array_get_item(&orte_component_map, i))) {
 103             OBJ_RELEASE(map);
 104         }
 105     }
 106 
 107     OBJ_DESTRUCT(&orte_component_map);
 108 
 109     opened_components = false;
 110 }