Commit fc2b251a authored by Philip Carns's avatar Philip Carns
Browse files

update to margo-registered-data branch api in margo

parent aa2f51e9
......@@ -51,15 +51,10 @@ static hg_id_t ssg_group_attach_rpc_id;
*/
void ssg_register_rpcs()
{
hg_class_t *hgcl = NULL;
hgcl = margo_get_class(ssg_inst->mid);
if (!hgcl) return;
/* register HG RPCs for SSG */
ssg_group_attach_rpc_id = MERCURY_REGISTER(hgcl, "ssg_group_attach",
MARGO_REGISTER(ssg_inst->mid, "ssg_group_attach",
ssg_group_attach_request_t, ssg_group_attach_response_t,
ssg_group_attach_recv_ult_handler);
ssg_group_attach_recv_ult, &ssg_group_attach_rpc_id);
return;
}
......
......@@ -103,14 +103,15 @@ int main(int argc, char **argv)
if(g_opts.diag_file_name)
margo_diag_start(mid);
MARGO_REGISTER(
MARGO_REGISTER_MPLEX(
mid,
"noop_rpc",
void,
void,
noop_ult_handler,
noop_ult,
MARGO_DEFAULT_MPLEX_ID,
NULL);
NULL,
MARGO_RPC_ID_IGNORE);
/* set up group */
ret = ssg_init(mid);
......@@ -245,11 +246,8 @@ static void usage(void)
static void noop_ult(hg_handle_t handle)
{
margo_instance_id mid;
const struct hg_info *hgi;
hgi = HG_Get_info(handle);
assert(hgi);
mid = margo_hg_class_to_instance(hgi->hg_class);
mid = margo_hg_handle_get_instance(handle);
margo_respond(mid, handle, NULL);
HG_Destroy(handle);
......
......@@ -123,8 +123,8 @@ int main(int argc, char *argv[])
DIE_IF(sret != SSG_SUCCESS, "ssg_init");
/* register RPC for forwarding an SSG group identifier */
group_id_forward_rpc_id = MERCURY_REGISTER(hgcl, "group_id_forward",
ssg_group_id_t, void, group_id_forward_recv_ult_handler);
MARGO_REGISTER(mid, "group_id_forward",
ssg_group_id_t, void, group_id_forward_recv_ult, &group_id_forward_rpc_id);
group_id_forward_ctx.mid = mid;
group_id_forward_ctx.g_id_p = &g_id;
hret = HG_Register_data(hgcl, group_id_forward_rpc_id, &group_id_forward_ctx, NULL);
......
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