Commit 5edc0ead authored by Shane Snyder's avatar Shane Snyder

define margo_set_target_id

parent 7318e084
...@@ -54,8 +54,7 @@ void svc1_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id) ...@@ -54,8 +54,7 @@ void svc1_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id)
HG_BULK_READ_ONLY, &in.bulk_handle); HG_BULK_READ_ONLY, &in.bulk_handle);
assert(hret == HG_SUCCESS); assert(hret == HG_SUCCESS);
/* XXX */ margo_set_target_id(handle, mplex_id);
HG_Set_target_id(handle, mplex_id);
/* Send rpc. Note that we are also transmitting the bulk handle in the /* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above. * input struct. It was set above.
...@@ -101,8 +100,7 @@ void svc1_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl ...@@ -101,8 +100,7 @@ void svc1_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl
HG_BULK_READ_ONLY, &in.bulk_handle); HG_BULK_READ_ONLY, &in.bulk_handle);
assert(hret == HG_SUCCESS); assert(hret == HG_SUCCESS);
/* XXX */ margo_set_target_id(handle, mplex_id);
HG_Set_target_id(handle, mplex_id);
/* Send rpc. Note that we are also transmitting the bulk handle in the /* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above. * input struct. It was set above.
......
...@@ -53,8 +53,7 @@ void svc2_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id) ...@@ -53,8 +53,7 @@ void svc2_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id)
HG_BULK_READ_ONLY, &in.bulk_handle); HG_BULK_READ_ONLY, &in.bulk_handle);
assert(hret == HG_SUCCESS); assert(hret == HG_SUCCESS);
/* XXX */ margo_set_target_id(handle, mplex_id);
HG_Set_target_id(handle, mplex_id);
/* Send rpc. Note that we are also transmitting the bulk handle in the /* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above. * input struct. It was set above.
...@@ -100,8 +99,7 @@ void svc2_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl ...@@ -100,8 +99,7 @@ void svc2_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl
HG_BULK_READ_ONLY, &in.bulk_handle); HG_BULK_READ_ONLY, &in.bulk_handle);
assert(hret == HG_SUCCESS); assert(hret == HG_SUCCESS);
/* XXX */ margo_set_target_id(handle, mplex_id);
HG_Set_target_id(handle, mplex_id);
/* Send rpc. Note that we are also transmitting the bulk handle in the /* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above. * input struct. It was set above.
......
...@@ -367,6 +367,18 @@ hg_return_t margo_free_output( ...@@ -367,6 +367,18 @@ hg_return_t margo_free_output(
hg_handle_t handle, hg_handle_t handle,
void *out_struct); void *out_struct);
/**
* Set target ID that will receive and process RPC request.
*
* \param [in] handle Mercury handle
* \param [in] target_id user-defined target ID
*
* \return HG_SUCCESS or corresponding HG error code
*/
hg_return_t margo_set_target_id(
hg_handle_t handle,
hg_uint8_t target_id);
/** /**
* Forward an RPC request to a remote host * Forward an RPC request to a remote host
* @param [in] mid Margo instance * @param [in] mid Margo instance
......
...@@ -579,6 +579,13 @@ hg_return_t margo_free_output( ...@@ -579,6 +579,13 @@ hg_return_t margo_free_output(
return(HG_Free_output(handle, out_struct)); return(HG_Free_output(handle, out_struct));
} }
hg_return_t margo_set_target_id(
hg_handle_t handle,
hg_uint8_t target_id)
{
return(HG_Set_target_id(handle, target_id));
}
static hg_return_t margo_cb(const struct hg_cb_info *info) static hg_return_t margo_cb(const struct hg_cb_info *info)
{ {
hg_return_t hret = info->ret; hg_return_t hret = info->ret;
......
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