***SPAM*** [ofa-general] [PATCH 1/5] opensm/osm_opensm.[ch] make setup and destroy routing engines functions global.
Eli Dorfman (Voltaire)
dorfman.eli at gmail.com
Tue Jan 20 06:02:12 PST 2009
make setup and destroy routing engines functions global.
change setup_routing_engines() and destroy_routing_engines()
declaration
Signed-off-by: Eli Dorfman <elid at voltaire.com>
---
opensm/include/opensm/osm_opensm.h | 53 ++++++++++++++++++++++++++++++++++++
opensm/opensm/osm_opensm.c | 5 ++-
2 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/opensm/include/opensm/osm_opensm.h b/opensm/include/opensm/osm_opensm.h
index c121be4..5b0a1dd 100644
--- a/opensm/include/opensm/osm_opensm.h
+++ b/opensm/include/opensm/osm_opensm.h
@@ -458,6 +458,59 @@ osm_opensm_wait_for_subnet_up(IN osm_opensm_t * const p_osm,
* SEE ALSO
*********/
+/****f* OpenSM: OpenSM/setup_routing_engines
+* NAME
+* setup_routing_engines
+*
+* DESCRIPTION
+* This function constructs an routing engines.
+*
+* SYNOPSIS
+*/
+void setup_routing_engines(osm_opensm_t *osm, const char *name);
+/*
+* PARAMETERS
+* p_osm
+* [in] Pointer to a OpenSM object to construct.
+*
+* name
+* [in] Routing engine names.
+*
+* RETURN VALUE
+* This function does not return a value.
+*
+* NOTES
+* Setup of routing engines
+*
+* SEE ALSO
+* destroy_routing_engines
+*********/
+
+/****f* OpenSM: OpenSM/destroy_routing_engines
+* NAME
+* destroy_routing_engines
+*
+* DESCRIPTION
+* This function constructs an routing engines.
+*
+* SYNOPSIS
+*/
+void destroy_routing_engines(osm_opensm_t *osm);
+/*
+* PARAMETERS
+* p_osm
+* [in] Pointer to a OpenSM object to construct.
+*
+* RETURN VALUE
+* This function does not return a value.
+*
+* NOTES
+* Setup of routing engines
+*
+* SEE ALSO
+* setup_routing_engines
+*********/
+
/****f* OpenSM: OpenSM/osm_routing_engine_type_str
* NAME
* osm_routing_engine_type_str
diff --git a/opensm/opensm/osm_opensm.c b/opensm/opensm/osm_opensm.c
index 7de2e5b..8ecb942 100644
--- a/opensm/opensm/osm_opensm.c
+++ b/opensm/opensm/osm_opensm.c
@@ -186,7 +186,7 @@ static void setup_routing_engine(osm_opensm_t *osm, const char *name)
"cannot find or setup routing engine \'%s\'", name);
}
-static void setup_routing_engines(osm_opensm_t *osm, const char *engine_names)
+void setup_routing_engines(osm_opensm_t *osm, const char *engine_names)
{
char *name, *str, *p;
@@ -224,7 +224,7 @@ void osm_opensm_construct(IN osm_opensm_t * const p_osm)
/**********************************************************************
**********************************************************************/
-static void destroy_routing_engines(osm_opensm_t *osm)
+void destroy_routing_engines(osm_opensm_t *osm)
{
struct osm_routing_engine *r, *next;
@@ -236,6 +236,7 @@ static void destroy_routing_engines(osm_opensm_t *osm)
r->delete(r->context);
free(r);
}
+ osm->routing_engine_list = NULL;
}
/**********************************************************************
--
1.5.5
More information about the general
mailing list