Commit 10c569c3 authored by Philip Carns's avatar Philip Carns

incremental progress

parent e27261e2
......@@ -114,16 +114,27 @@ int svc1_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id)
hg_return_t hret;
hg_id_t id;
hg_bool_t flag;
int ret;
/* TODO: the following, for each function */
/* TODO: this should be a macro really */
hret = HG_Registered_name(margo_get_class(mid), "svc1_do_thing", &id, &flag);
if(hret != HG_SUCCESS)
{
return(-1);
}
if(!flag)
{
id = MERCURY_REGISTER(margo_get_class(mid), "svc1_do_thing", svc1_do_thing_in_t, svc1_do_thing_out_t, svc1_do_thing_ult_handler);
}
ret = margo_register_mplex(mid, id, mplex_id, pool);
if(ret < 0)
{
return(ret);
}
/* TODO: for each function:
* - check if registered with mercury or not
* - if not, then register
* - register with margo
* - this will put into hash table in mid that can map <id,mplex_id> to
* <pool>, checking for duplicate first
......
......@@ -190,6 +190,14 @@ void margo_thread_sleep(
*/
margo_instance_id margo_hg_class_to_instance(hg_class_t *cl);
/**
* Registers an RPC with margo that is associated with a multiplexed service
* @param [in] mid Margo instance
* @param [in] id Mercury RPC identifier
* @param [in] pool Argobots pool the handler will execute in
*/
int margo_register_mplex(margo_instance_id mid, hg_id_t id, uint32_t mplex_id, ABT_pool pool);
/**
* macro that defines a function to glue an RPC handler to a ult handler
* @param [in] __name name of handler function
......
......@@ -784,3 +784,8 @@ static int margo_xstream_is_in_progress_pool(margo_instance_id mid)
else
return(0);
}
int margo_register_mplex(margo_instance_id mid, hg_id_t id, uint32_t mplex_id, ABT_pool pool)
{
return(-1);
}
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