Commit 9b7c894e authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added the possibility to set the ABT-IO instance of a provider afterward

parent 7a43c723
...@@ -92,6 +92,18 @@ int remi_provider_registered( ...@@ -92,6 +92,18 @@ int remi_provider_registered(
ABT_pool* pool, ABT_pool* pool,
remi_provider_t* provider); remi_provider_t* provider);
/**
* @brief Sets the ABT-IO instance to use for I/O.
*
* @param provider Provider.
* @param abtio ABT-IO instance.
*
* @return REMI_SUCCESS or error code defined in remi-common.h.
*/
int remi_provider_set_abt_io_instance(
remi_provider_t provider,
abt_io_instance_id* abtio);
/** /**
* @brief Registers a migration class by providing a callback * @brief Registers a migration class by providing a callback
* to call when a fileset of that class is migrated. * to call when a fileset of that class is migrated.
......
...@@ -329,7 +329,6 @@ int migrate_using_abtio( ...@@ -329,7 +329,6 @@ int migrate_using_abtio(
// get file size // get file size
struct stat st; struct stat st;
if(0 != fstat(fd, &st)) { if(0 != fstat(fd, &st)) {
close(fd);
cleanup(); cleanup();
return REMI_ERR_IO; return REMI_ERR_IO;
} }
......
...@@ -463,6 +463,14 @@ extern "C" int remi_provider_registered( ...@@ -463,6 +463,14 @@ extern "C" int remi_provider_registered(
return REMI_SUCCESS; return REMI_SUCCESS;
} }
extern "C" int remi_provider_set_abt_io_instance(
remi_provider_t provider,
abt_io_instance_id* abtio)
{
provider->m_abt_io = abtio;
return REMI_SUCCESS;
}
extern "C" int remi_provider_register_migration_class( extern "C" int remi_provider_register_migration_class(
remi_provider_t provider, remi_provider_t provider,
const char* class_name, const char* class_name,
......
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