summaryrefslogtreecommitdiffstats
path: root/src/H5Tcommit.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-03-28 15:36:13 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-03-28 15:36:13 (GMT)
commitfd88a0006ead7571a652586c9f2eb376123b2f3b (patch)
treee933d4303ece0f743fde709cb73120241fa4fa1e /src/H5Tcommit.c
parentdbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4 (diff)
downloadhdf5-fd88a0006ead7571a652586c9f2eb376123b2f3b.zip
hdf5-fd88a0006ead7571a652586c9f2eb376123b2f3b.tar.gz
hdf5-fd88a0006ead7571a652586c9f2eb376123b2f3b.tar.bz2
[svn-r23473] Update the VOL plugin callbacks with better async I/O support:
- change hid_t req in callbacks to void **req - change all callbacks to accept dxpl_ids (except dataset write and read which already do) - update all the private and public VL routines to accept a dxpl_id and event queue id - Add an async class for the VOL plugin with cancel, test, and wait request operations - add the external VOL log plugin test to the examples directory NOTE that async operations are still not provided by the HDF5 API, so all event queue IDs and requests passed to all plugins are NULL for now. Tested on jam.
Diffstat (limited to 'src/H5Tcommit.c')
-rw-r--r--src/H5Tcommit.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 9d02c72..6c1dbb5 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -175,7 +175,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
/* commit the datatype through the VOL */
if (NULL == (dt = H5VL_datatype_commit(obj, loc_params, vol_plugin, name, type_id, lcpl_id,
- tcpl_id, tapl_id, H5_REQUEST_NULL)))
+ tcpl_id, tapl_id, H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* attach the vol object created using the commit call to the
@@ -336,7 +336,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
/* commite the datatype through the VOL */
if (NULL == (dt = H5VL_datatype_commit(obj, loc_params, vol_plugin, NULL, type_id, H5P_DEFAULT,
- tcpl_id, tapl_id, H5_REQUEST_NULL)))
+ tcpl_id, tapl_id, H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* attach the vol object created using the commit call to the
@@ -624,16 +624,17 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* Create the datatype through the VOL */
- if(NULL == (dt = H5VL_datatype_open(obj, loc_params, vol_plugin, name, tapl_id, H5_REQUEST_NULL)))
+ if(NULL == (dt = H5VL_datatype_open(obj, loc_params, vol_plugin, name, tapl_id,
+ H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open datatype")
/* Get an atom for the datatype */
- if ((ret_value = H5VL_create_datatype(dt, vol_plugin, TRUE, H5_REQUEST_NULL)) < 0)
+ if ((ret_value = H5VL_create_datatype(dt, vol_plugin, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize datatype handle")
done:
if (ret_value < 0 && dt)
- if(H5VL_datatype_close (dt, vol_plugin, H5_REQUEST_NULL) < 0)
+ if(H5VL_datatype_close (dt, vol_plugin, H5AC_dxpl_id, H5_EVENT_QUEUE_NULL) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Topen2() */
@@ -956,7 +957,7 @@ H5T_get_named_type(const H5T_t *dt)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_create_datatype(void *dt_obj, H5VL_t *vol_plugin, hbool_t app_ref, hid_t req)
+H5VL_create_datatype(void *dt_obj, H5VL_t *vol_plugin, hbool_t app_ref)
{
ssize_t nalloc;
unsigned char *buf = NULL;
@@ -965,8 +966,9 @@ H5VL_create_datatype(void *dt_obj, H5VL_t *vol_plugin, hbool_t app_ref, hid_t re
FUNC_ENTER_NOAPI(FAIL)
- /* get required buf size for encoding the datatype */
- if((nalloc = H5VL_datatype_get_binary(dt_obj, vol_plugin, NULL, 0, req)) < 0)
+ /* get required buf size for encoding the datatype */
+ if((nalloc = H5VL_datatype_get_binary(dt_obj, vol_plugin, NULL, 0,
+ H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to get datatype size")
/* allocate buffer to store binary description of the datatype */
@@ -974,7 +976,8 @@ H5VL_create_datatype(void *dt_obj, H5VL_t *vol_plugin, hbool_t app_ref, hid_t re
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate space for datatype")
/* get binary description of the datatype */
- if((nalloc = H5VL_datatype_get_binary(dt_obj, vol_plugin, buf, (size_t) nalloc, req)) < 0)
+ if((nalloc = H5VL_datatype_get_binary(dt_obj, vol_plugin, buf, (size_t) nalloc,
+ H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to get datatype size")
if(NULL == (dt = H5T_decode(buf)))
@@ -1016,7 +1019,7 @@ H5T_close_datatype(void *type, H5VL_t *vol_plugin)
/* Close the datatype through the VOL*/
if (NULL != dt->vol_obj)
- if((ret_value = H5VL_datatype_close(dt->vol_obj, vol_plugin, H5_REQUEST_NULL)) < 0)
+ if((ret_value = H5VL_datatype_close(dt->vol_obj, vol_plugin, H5AC_dxpl_id, H5_EVENT_QUEUE_NULL)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype")
done: