1
1

* Add a finalize function for iof framework and add a finalize function for

the svc component so that it can disable the rml exception callback, fixing
  a race condition in the shutdown mechanism of orte.

  This should probably go to the v1.0 branch.

This commit was SVN r8893.
Этот коммит содержится в:
Brian Barrett 2006-02-03 21:01:11 +00:00
родитель ddda56eb0d
Коммит 7c247eea01
5 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -41,6 +41,11 @@ int orte_iof_base_close(void)
orte_iof_base.iof_flush = false; orte_iof_base.iof_flush = false;
} }
/* finalize component */
if (NULL != orte_iof.iof_finalize) {
orte_iof.iof_finalize();
}
/* shutdown any remaining opened components */ /* shutdown any remaining opened components */
if (0 != opal_list_get_size(&orte_iof_base.iof_components_opened)) { if (0 != opal_list_get_size(&orte_iof_base.iof_components_opened)) {
mca_base_components_close(orte_iof_base.iof_output, mca_base_components_close(orte_iof_base.iof_output,

Просмотреть файл

@ -164,6 +164,8 @@ typedef int (*orte_iof_base_unsubscribe_fn_t)(
typedef int (*orte_iof_base_flush_fn_t)(void); typedef int (*orte_iof_base_flush_fn_t)(void);
typedef int (*orte_iof_base_finalize_fn_t)(void);
/** /**
* IOF module. * IOF module.
*/ */
@ -176,6 +178,7 @@ struct orte_iof_base_module_1_0_0_t {
orte_iof_base_subscribe_fn_t iof_subscribe; orte_iof_base_subscribe_fn_t iof_subscribe;
orte_iof_base_unsubscribe_fn_t iof_unsubscribe; orte_iof_base_unsubscribe_fn_t iof_unsubscribe;
orte_iof_base_flush_fn_t iof_flush; orte_iof_base_flush_fn_t iof_flush;
orte_iof_base_finalize_fn_t iof_finalize;
}; };
typedef struct orte_iof_base_module_1_0_0_t orte_iof_base_module_1_0_0_t; typedef struct orte_iof_base_module_1_0_0_t orte_iof_base_module_1_0_0_t;

Просмотреть файл

@ -41,7 +41,8 @@ orte_iof_base_module_t orte_iof_svc_module = {
orte_iof_svc_pull, orte_iof_svc_pull,
orte_iof_svc_subscribe, orte_iof_svc_subscribe,
orte_iof_svc_unsubscribe, orte_iof_svc_unsubscribe,
orte_iof_base_flush orte_iof_base_flush,
orte_iof_svc_finalize
}; };
@ -265,4 +266,3 @@ int orte_iof_svc_unsubscribe(
/* cleanup any locally registered callback */ /* cleanup any locally registered callback */
return orte_iof_base_callback_delete(ORTE_RML_NAME_SELF,src_tag); return orte_iof_base_callback_delete(ORTE_RML_NAME_SELF,src_tag);
} }

Просмотреть файл

@ -133,6 +133,8 @@ int orte_iof_svc_unsubscribe(
orte_iof_base_tag_t src_tag orte_iof_base_tag_t src_tag
); );
int orte_iof_svc_finalize(void);
/** /**
* IOF svc Component * IOF svc Component
*/ */

Просмотреть файл

@ -182,3 +182,11 @@ orte_iof_svc_init(int* priority, bool *allow_multi_user_threads, bool *have_hidd
return &orte_iof_svc_module; return &orte_iof_svc_module;
} }
int
orte_iof_svc_finalize(void)
{
orte_rml.del_exception_handler(orte_iof_svc_exception_handler);
return OMPI_SUCCESS;
}