Commit 08523f62 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added REMI client injection in bedrock module and REMI client argument

parent f9bd9a26
......@@ -31,11 +31,12 @@ struct bake_provider_init_info {
ABT_pool rpc_pool; /* optional pool on which to run RPC handlers */
abt_io_instance_id aid; /* optional abt-io instance, used by file backend */
void* remi_provider; /* optional REMI provider */
void* remi_client; /* optional REMI client */
};
#define BAKE_PROVIDER_INIT_INFO_INITIALIZER \
{ \
NULL, ABT_POOL_NULL, ABT_IO_INSTANCE_NULL, NULL \
#define BAKE_PROVIDER_INIT_INFO_INITIALIZER \
{ \
NULL, ABT_POOL_NULL, ABT_IO_INSTANCE_NULL, NULL, NULL \
}
/**
......
......@@ -70,13 +70,15 @@ class provider {
ABT_pool pool = ABT_POOL_NULL,
const std::string& config = "",
abt_io_instance_id abtio = ABT_IO_INSTANCE_NULL,
void* remi = NULL)
void* remi_provider = NULL,
void* remi_client = NULL)
{
bake_provider_init_info args = BAKE_PROVIDER_INIT_INFO_INITIALIZER;
args.json_config = config.c_str();
args.rpc_pool = pool;
args.aid = abtio;
args.remi_provider = remi;
args.remi_provider = remi_provider;
args.remi_client = remi_client;
return create(mid, provider_id, &args);
}
......
......@@ -34,7 +34,13 @@ static int bake_register_provider(bedrock_args_t args,
= bedrock_args_get_dependency(args, "remi_provider", 0);
} else {
bpargs.remi_provider = NULL;
;
}
if (bedrock_args_get_num_dependencies(args, "remi_client")) {
bpargs.remi_client
= bedrock_args_get_dependency(args, "remi_client", 0);
} else {
bpargs.remi_client = NULL;
}
BAKE_TRACE(mid, "bake_register_provider()");
......@@ -45,6 +51,7 @@ static int bake_register_provider(bedrock_args_t args,
BAKE_TRACE(mid, " -> name = %s", name);
BAKE_TRACE(mid, " -> abt_io = %p", bpargs.aid);
BAKE_TRACE(mid, " -> remi_provider = %p", bpargs.remi_provider);
BAKE_TRACE(mid, " -> remi_client = %p", bpargs.remi_client);
bpargs.json_config = config;
ret = bake_provider_register(mid, provider_id, &bpargs,
......@@ -121,8 +128,9 @@ static int bake_destroy_provider_handle(bedrock_module_provider_handle_t ph)
* - if needed by not provided as a dependency, then the backend will create
* one of it's own implicitly
*/
struct bedrock_dependency bake_deps[3] = {{"abt_io", "abt_io", 0},
struct bedrock_dependency bake_deps[4] = {{"abt_io", "abt_io", 0},
{"remi_provider", "remi", 0},
{"remi_client", "remi", 0},
BEDROCK_NO_MORE_DEPENDENCIES};
static struct bedrock_module bake
......
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