Commit ffc8f114 authored by Philip Carns's avatar Philip Carns

stub for bulk persist fn

parent aec05985
......@@ -60,6 +60,13 @@ int bake_bulk_create(
*
* Results are undefined if multiple writers (from same process or different
* processes) perform overlapping writes.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for new region
* @param [in] region_offset offset into the target region to write
* @param [in] buf local memory buffer to write
* @param [in] buf_size size of local memory buffer to write
* @returns 0 on success, -1 on failure
*/
int bake_bulk_write(
bake_target_id_t bti,
......@@ -67,6 +74,18 @@ int bake_bulk_write(
uint64_t region_offset,
void const *buf,
uint64_t buf_size);
/**
* Persist a bulk region. The region is considered immutable at this point
* and reads may be performed on the region.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for new region
* @returns 0 on success, -1 on failure
*/
int bake_bulk_persist(
bake_target_id_t bti,
bake_bulk_region_id_t rid);
/**
* Release local resources associated with access to a target; does not
......
......@@ -237,3 +237,10 @@ int bake_bulk_create(
}
int bake_bulk_persist(
bake_target_id_t bti,
bake_bulk_region_id_t rid)
{
/* TODO: implement */
return(-1);
}
......@@ -116,10 +116,18 @@ int main(int argc, char **argv)
return(-1);
}
/* TODO: persist */
munmap(local_region, statbuf.st_size);
close(fd);
ret = bake_bulk_persist(bti, rid);
if(ret != 0)
{
bake_release_instance(bti);
ABT_finalize();
fprintf(stderr, "Error: bake_bulk_persist()\n");
return(-1);
}
bake_release_instance(bti);
ABT_finalize();
......
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