From 2e2bf472ff0985c67f33bedc03586c3c4b02508c Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 31 Jul 2007 16:09:52 +0000 Subject: [PATCH] Mark the orte_abort function as noreturn and change the return value from int to void. This function call exit at the end, so there is no way to return from there. Apply the same thing to the errmsg_abort function and update all components. This commit was SVN r15704. --- orte/mca/errmgr/base/errmgr_private.h | 2 +- orte/mca/errmgr/bproc/errmgr_bproc.h | 2 +- orte/mca/errmgr/errmgr.h | 2 +- orte/mca/errmgr/hnp/errmgr_hnp.h | 2 +- orte/mca/errmgr/orted/errmgr_orted.h | 2 +- orte/mca/errmgr/proxy/errmgr_proxy.h | 2 +- orte/runtime/orte_abort.c | 2 +- orte/runtime/runtime.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/orte/mca/errmgr/base/errmgr_private.h b/orte/mca/errmgr/base/errmgr_private.h index 022cd334c6..2c1d0d4322 100644 --- a/orte/mca/errmgr/base/errmgr_private.h +++ b/orte/mca/errmgr/base/errmgr_private.h @@ -69,7 +69,7 @@ ORTE_DECLSPEC void orte_errmgr_base_error_detected(int error_code, char *fmt, ORTE_DECLSPEC int orte_errmgr_base_register_job_not_avail(orte_jobid_t job); -ORTE_DECLSPEC void orte_errmgr_base_abort(void); +ORTE_DECLSPEC void orte_errmgr_base_abort(void) __opal_attribute_noreturn__; ORTE_DECLSPEC int orte_errmgr_base_abort_procs_request_not_avail(orte_process_name_t *procs, orte_std_cntr_t num_procs); diff --git a/orte/mca/errmgr/bproc/errmgr_bproc.h b/orte/mca/errmgr/bproc/errmgr_bproc.h index 19e1df704e..2966771003 100644 --- a/orte/mca/errmgr/bproc/errmgr_bproc.h +++ b/orte/mca/errmgr/bproc/errmgr_bproc.h @@ -68,7 +68,7 @@ int orte_errmgr_bproc_incomplete_start(orte_gpr_notify_message_t *msg); void orte_errmgr_bproc_error_detected(int error_code, char *fmt, ...) __opal_attribute_format__(__printf__, 2, 3); -void orte_errmgr_bproc_abort(void); +void orte_errmgr_bproc_abort(void) __opal_attribute_noreturn__; int orte_errmgr_bproc_register_job(orte_jobid_t job); diff --git a/orte/mca/errmgr/errmgr.h b/orte/mca/errmgr/errmgr.h index 4c9f6be642..a8efae07db 100644 --- a/orte/mca/errmgr/errmgr.h +++ b/orte/mca/errmgr/errmgr.h @@ -144,7 +144,7 @@ typedef int (*orte_errmgr_base_module_register_job_fn_t)(orte_jobid_t job); * itself, and then exits - it takes no other actions. The intent here is to provide * a last-ditch exit procedure that attempts to clean up a little. */ -typedef void (*orte_errmgr_base_module_abort_fn_t)(void); +typedef void (*orte_errmgr_base_module_abort_fn_t)(void) __opal_attribute_noreturn__; /* * Request that the system abort processes other than myself diff --git a/orte/mca/errmgr/hnp/errmgr_hnp.h b/orte/mca/errmgr/hnp/errmgr_hnp.h index d05fca220f..42012dcca6 100644 --- a/orte/mca/errmgr/hnp/errmgr_hnp.h +++ b/orte/mca/errmgr/hnp/errmgr_hnp.h @@ -66,7 +66,7 @@ int orte_errmgr_hnp_incomplete_start(orte_gpr_notify_message_t *msg); void orte_errmgr_hnp_error_detected(int error_code, char *fmt, ...) __opal_attribute_format__(__printf__, 2, 3); -void orte_errmgr_hnp_abort(void); +void orte_errmgr_hnp_abort(void) __opal_attribute_noreturn__; int orte_errmgr_hnp_register_job(orte_jobid_t job); diff --git a/orte/mca/errmgr/orted/errmgr_orted.h b/orte/mca/errmgr/orted/errmgr_orted.h index 166874db3c..de44dc3eed 100644 --- a/orte/mca/errmgr/orted/errmgr_orted.h +++ b/orte/mca/errmgr/orted/errmgr_orted.h @@ -68,7 +68,7 @@ int orte_errmgr_orted_incomplete_start(orte_gpr_notify_message_t *msg); void orte_errmgr_orted_error_detected(int error_code, char *fmt, ...) __opal_attribute_format__(__printf__, 2, 3); -void orte_errmgr_orted_abort(void); +void orte_errmgr_orted_abort(void) __opal_attribute_noreturn__; int orte_errmgr_orted_register_job(orte_jobid_t job); diff --git a/orte/mca/errmgr/proxy/errmgr_proxy.h b/orte/mca/errmgr/proxy/errmgr_proxy.h index f03646031c..f44d1e9f35 100644 --- a/orte/mca/errmgr/proxy/errmgr_proxy.h +++ b/orte/mca/errmgr/proxy/errmgr_proxy.h @@ -68,7 +68,7 @@ int orte_errmgr_proxy_incomplete_start(orte_gpr_notify_message_t *msg); void orte_errmgr_proxy_error_detected(int error_code, char *fmt, ...) __opal_attribute_format__(__printf__, 2, 3); -void orte_errmgr_proxy_abort(void); +void orte_errmgr_proxy_abort(void) __opal_attribute_noreturn__; int orte_errmgr_proxy_register_job(orte_jobid_t job); diff --git a/orte/runtime/orte_abort.c b/orte/runtime/orte_abort.c index d4a6eedb1e..2815e79b58 100644 --- a/orte/runtime/orte_abort.c +++ b/orte/runtime/orte_abort.c @@ -67,7 +67,7 @@ * to prevent the abort file from being created. This allows the * session directory tree to cleanly be eliminated. */ -int orte_abort(int status, bool report) +void orte_abort(int status, bool report) { char *abort_file; int fd; diff --git a/orte/runtime/runtime.h b/orte/runtime/runtime.h index a120fea05b..45028528ad 100644 --- a/orte/runtime/runtime.h +++ b/orte/runtime/runtime.h @@ -60,7 +60,7 @@ extern "C" { * function should create an appropriate file to alert the local * orted that termination was abnormal. */ -ORTE_DECLSPEC int orte_abort(int status, bool report); +ORTE_DECLSPEC void orte_abort(int status, bool report) __opal_attribute_noreturn__; /**