Commit 5243b6e4 authored by Rob Latham's avatar Rob Latham

Update margo to use new mercury error codes

parent 1d228c98
......@@ -1136,7 +1136,7 @@ void _wrapper_for_##__name(hg_handle_t handle) { \
ABT_pool __pool; \
margo_instance_id __mid; \
__mid = margo_hg_handle_get_instance(handle); \
if(__mid == MARGO_INSTANCE_NULL) { return(HG_OTHER_ERROR); } \
if(__mid == MARGO_INSTANCE_NULL) { return(HG_INVALID_ARG); } \
if(__margo_internal_finalize_requested(__mid)) { return(HG_CANCELED); } \
__pool = margo_hg_handle_get_handler_pool(handle); \
__margo_internal_incr_pending(__mid); \
......
......@@ -87,14 +87,14 @@ hg_return_t margo_bulk_pool_create(
ret = ABT_mutex_create(&p->mutex);
if (ret != ABT_SUCCESS)
{
hret = HG_OTHER_ERROR;
hret = HG_NOMEM_ERROR;
goto err;
}
ret = ABT_cond_create(&p->cond);
if (ret != ABT_SUCCESS)
{
ABT_mutex_free(&p->mutex);
hret = HG_OTHER_ERROR;
hret = HG_NOMEM_ERROR;
goto err;
}
......
......@@ -926,7 +926,7 @@ hg_return_t margo_register_data(
{
struct margo_rpc_data* margo_data
= (struct margo_rpc_data*) HG_Registered_data(mid->hg_class, id);
if(!margo_data) return HG_OTHER_ERROR;
if(!margo_data) return HG_INVALID_ARG;
if(margo_data->user_data && margo_data->user_free_callback) {
(margo_data->user_free_callback)(margo_data->user_data);
}
......@@ -1046,7 +1046,7 @@ hg_return_t margo_addr_to_string(
hg_return_t margo_create(margo_instance_id mid, hg_addr_t addr,
hg_id_t id, hg_handle_t *handle)
{
hg_return_t hret = HG_OTHER_ERROR;
hg_return_t hret = HG_INVALID_ARG;
/* look for a handle to reuse */
hret = margo_handle_cache_get(mid, addr, id, handle);
......@@ -1072,7 +1072,7 @@ hg_return_t margo_destroy(hg_handle_t handle)
}
margo_instance_id mid;
hg_return_t hret = HG_OTHER_ERROR;
hg_return_t hret = HG_INVALID_ARG;
/* use the handle to get the associated mid */
mid = margo_hg_handle_get_instance(handle);
......@@ -1202,7 +1202,7 @@ static hg_return_t margo_provider_iforward_internal(
ret = margo_register_internal(margo_hg_info_get_instance(hgi),
id, in_cb, out_cb, NULL, ABT_POOL_NULL);
if(ret == 0)
return(HG_OTHER_ERROR);
return(HG_INVALID_ARG);
ret = HG_Registered_disable_response(hgi->hg_class, id, response_disabled);
if(ret != HG_SUCCESS)
return(ret);
......@@ -2145,7 +2145,7 @@ static hg_return_t margo_handle_cache_get(margo_instance_id mid,
if(!mid->free_handle_list)
{
/* if no available handles, just fall through */
hret = HG_OTHER_ERROR;
hret = HG_NOMEM;
goto finish;
}
......@@ -2185,7 +2185,7 @@ static hg_return_t margo_handle_cache_put(margo_instance_id mid,
if(!el)
{
/* this handle was manually allocated -- just fall through */
hret = HG_OTHER_ERROR;
hret = HG_INVALID_ARG;
goto finish;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment