From 4791c905979f99d9d06fb3f1cdfc4dbe5ccec32f Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Thu, 30 Jul 2015 16:01:11 -0500 Subject: [svn-r27447] more merge fixes. --- src/H5AS.c | 4 +- src/H5ES.c | 14 +- src/H5FF.c | 186 +++++++++++++------------ src/H5M.c | 23 +-- src/H5Pocpl.c | 1 + src/H5Pvcpl.c | 8 +- src/H5Q.c | 32 ++--- src/H5RC.c | 94 ++++--------- src/H5RCprivate.h | 1 + src/H5Shyper.c | 11 +- src/H5T.c | 2 +- src/H5TR.c | 116 +++++----------- src/H5TRprivate.h | 1 + src/H5V.c | 34 ++--- src/H5VLiod.c | 371 +++++++++++++++++++++++++++++-------------------- src/H5VLiod.h | 2 + src/H5VLiod_analysis.c | 16 +-- src/H5VLiod_attr.c | 48 +++---- src/H5VLiod_dset.c | 52 +++---- src/H5VLiod_dtype.c | 18 +-- src/H5VLiod_file.c | 18 +-- src/H5VLiod_group.c | 18 +-- src/H5VLiod_index.c | 18 +-- src/H5VLiod_link.c | 36 ++--- src/H5VLiod_map.c | 48 +++---- src/H5VLiod_obj.c | 48 +++---- src/H5VLiod_server.c | 4 +- src/H5VLiod_trans.c | 66 ++++----- src/H5VLiod_util.c | 2 +- src/H5VLiod_view.c | 6 +- src/H5X.c | 14 +- src/H5Xalacrity.c | 8 +- src/H5Xdummy.c | 10 +- src/H5Xfastbit.c | 8 +- 34 files changed, 661 insertions(+), 677 deletions(-) diff --git a/src/H5AS.c b/src/H5AS.c index ea9cf05..4b56b5b 100644 --- a/src/H5AS.c +++ b/src/H5AS.c @@ -110,8 +110,6 @@ herr_t H5AS_invoke(const char *file_name, hid_t query_id, const char *split_script, const char *combine_script, const char *integrate_script, hid_t estack_id) { - H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ - void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -124,7 +122,7 @@ H5AS_invoke(const char *file_name, hid_t query_id, const char *split_script, /* Get the data through the IOD VOL */ if((ret_value = H5VL_iod_analysis_invoke(file_name, query_id, split_script, - combine_script, integrate_script, req)) < 0) + combine_script, integrate_script, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't start iod analysis shipping execution") diff --git a/src/H5ES.c b/src/H5ES.c index 94e7dec..8eca389 100644 --- a/src/H5ES.c +++ b/src/H5ES.c @@ -77,8 +77,7 @@ static const H5I_class_t H5I_ES_CLS[1] = {{ H5I_ES, /* ID class value */ 0, /* Class flags */ 2, /* # of reserved IDs for class */ - (H5I_free_t)H5ES_close, /* Callback routine for closing objects of this class */ - NULL /* Callback routine for closing auxilary objects of this class */ + (H5I_free_t)H5ES_close /* Callback routine for closing objects of this class */ }}; @@ -162,16 +161,17 @@ H5ES_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - if((n = H5I_nmembers(H5I_ES))) { - H5I_clear_type(H5I_ES, FALSE, FALSE); + if(H5I_nmembers(H5I_ES) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ } /* end if */ else { - /* Free data types */ - H5I_dec_type_ref(H5I_ES); + /* Destroy the dataspace object id group */ + (void)H5I_dec_type_ref(H5I_ES); + n++; /*H5I*/ /* Shut down interface */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ } /* end else */ } /* end if */ diff --git a/src/H5FF.c b/src/H5FF.c index 3859a43..49bd70d 100644 --- a/src/H5FF.c +++ b/src/H5FF.c @@ -26,6 +26,7 @@ #define H5D_PACKAGE /*suppress error about including H5Dpkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ #define H5G_PACKAGE /*suppress error about including H5Gpkg */ +#define H5O_PACKAGE /*suppress error about including H5Opkg */ #define H5T_PACKAGE /*suppress error about including H5Tpkg */ /* Interface initialization */ @@ -44,6 +45,7 @@ #include "H5Gpkg.h" /* Group access */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ #include "H5Qprivate.h" /* Query */ #include "H5Tpkg.h" /* Datatype access */ @@ -278,14 +280,16 @@ H5Fopen_ff(const char *filename, unsigned flags, hid_t fapl_id, /* determine if we want to acquire the latest readable version when the file is opened */ if(rcxt_id) { - H5P_genplist_t *plist = NULL; /* Property list pointer */ H5RC_t *rc = NULL; /* create a new read context object (if user requested it) */ if(NULL == (rc = H5RC_create(file, IOD_TID_UNKNOWN))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context"); + + rc->vol_cls = vol_info->vol_cls; + /* Get an atom for the event queue with the VOL information as the auxilary struct */ - if((*rcxt_id = H5VL_register_id(H5I_RC, rc, vol_info, TRUE)) < 0) + if((*rcxt_id = H5I_register(H5I_RC, rc, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle"); /* Get the plist structure */ @@ -593,7 +597,7 @@ H5Gclose_ff(hid_t group_id, hid_t estack_id) H5TRACE2("e", "ii", group_id, estack_id); /* Check args */ - if(NULL == (obj == (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP))) + if(NULL == (obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID") /* set the async request and dxpl IDs to be passed on to the VOL layer */ @@ -740,7 +744,7 @@ done: *------------------------------------------------------------------------- */ hid_t -H5Dcreate_anon_ff(hid_t file_id, hid_t type_id, hid_t space_id, +H5Dcreate_anon_ff(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t trans_id, hid_t estack_id) { void *dset = NULL; /* dset token from VOL plugin */ @@ -753,7 +757,7 @@ H5Dcreate_anon_ff(hid_t file_id, hid_t type_id, hid_t space_id, hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE7("i", "iiiiiii", file_id, type_id, space_id, dcpl_id, dapl_id, trans_id, + H5TRACE7("i", "iiiiiii", loc_id, type_id, space_id, dcpl_id, dapl_id, trans_id, estack_id); /* Get correct property list */ @@ -781,7 +785,7 @@ H5Dcreate_anon_ff(hid_t file_id, hid_t type_id, hid_t space_id, HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for space id") loc_params.type = H5VL_OBJECT_BY_SELF; - loc_params.obj_type = H5I_get_type(file_id); + loc_params.obj_type = H5I_get_type(loc_id); /* store the transaction ID in the dxpl */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) @@ -1105,7 +1109,7 @@ H5Dread_ff(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, /* Read the data through the VOL */ if((ret_value = H5VL_dataset_read(dset->vol_obj, dset->vol_info->vol_cls, mem_type_id, mem_space_id, - file_space_id, plist_id, buf, req)) < 0) + file_space_id, dxpl_id, buf, req)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") if(request && *req) @@ -1470,7 +1474,7 @@ H5Tclose_ff(hid_t type_id, hid_t estack_id) if(H5T_STATE_IMMUTABLE == dt->shared->state) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype") - if(NULL != (obj = (H5VL_object_t *)type->vol_obj)) { + if(NULL != (obj = (H5VL_object_t *)dt->vol_obj)) { obj->close_estack_id = estack_id; obj->close_dxpl_id = H5AC_dxpl_id; } @@ -1499,8 +1503,10 @@ H5Acreate_ff(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, void *attr = NULL; /* attr token from VOL plugin */ H5VL_object_t *obj = NULL; /* object token of loc_id */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + H5VL_loc_params_t loc_params; H5P_genplist_t *plist; /* Property list pointer */ - H5VL_loc_params_t loc_params; hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1585,6 +1591,8 @@ H5Acreate_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, void *attr = NULL; /* attr token from VOL plugin */ H5VL_object_t *obj = NULL; /* object token of loc_id */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5P_genplist_t *plist; /* Property list pointer */ H5VL_loc_params_t loc_params; hid_t ret_value; /* Return value */ @@ -1771,7 +1779,7 @@ H5Aopen_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = obj_name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the location object */ @@ -2044,7 +2052,7 @@ H5Arename_by_name_ff(hid_t loc_id, const char *obj_name, const char *old_attr_na loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = obj_name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* store the transaction ID in the dxpl */ @@ -2184,7 +2192,7 @@ H5Adelete_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = obj_name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* store the transaction ID in the dxpl */ @@ -2336,7 +2344,7 @@ H5Aexists_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = obj_name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* store the transaction ID in the dxpl */ @@ -2389,7 +2397,7 @@ H5Aclose_ff(hid_t attr_id, hid_t estack_id) H5TRACE2("e", "ii", attr_id, estack_id); /* Check args */ - if(NULL == (obj == (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) + if(NULL == (obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute ID") /* set the async request and dxpl IDs to be passed on to the VOL layer */ @@ -2460,22 +2468,22 @@ H5Lmove_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, /* set location paramter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.loc_data.loc_by_name.name = src_name; - loc_params1.loc_data.loc_by_name.plist_id = lapl_id; + loc_params1.loc_data.loc_by_name.lapl_id = lapl_id; loc_params1.obj_type = H5I_get_type(src_loc_id); /* set location paramter for destination object */ loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.loc_data.loc_by_name.name = dst_name; - loc_params2.loc_data.loc_by_name.plist_id = lapl_id; + loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; loc_params2.obj_type = H5I_get_type(dst_loc_id); if(H5L_SAME_LOC != src_loc_id) { /* get the file object */ - if(NULL == (obj1 = (void *)H5I_object(src_loc_id))) + if(NULL == (obj1 = (H5VL_object_t *)H5I_object(src_loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") } if(H5L_SAME_LOC != dst_loc_id) { /* get the file object */ - if(NULL == (obj2 = (void *)H5I_object(dst_loc_id))) + if(NULL == (obj2 = (H5VL_object_t *)H5I_object(dst_loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") } @@ -2567,12 +2575,12 @@ H5Lcopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, /* set location paramter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.loc_data.loc_by_name.name = src_name; - loc_params1.loc_data.loc_by_name.plist_id = lapl_id; + loc_params1.loc_data.loc_by_name.lapl_id = lapl_id; loc_params1.obj_type = H5I_get_type(src_loc_id); /* set location paramter for destination object */ loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.loc_data.loc_by_name.name = dst_name; - loc_params2.loc_data.loc_by_name.plist_id = lapl_id; + loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; loc_params2.obj_type = H5I_get_type(dst_loc_id); if(H5L_SAME_LOC != src_loc_id) { @@ -2646,6 +2654,8 @@ H5Lcreate_soft_ff(const char *link_target, hid_t link_loc_id, const char *link_n H5VL_object_t *obj = NULL; /* object token of loc_id */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ H5VL_loc_params_t loc_params; + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2672,7 +2682,7 @@ H5Lcreate_soft_ff(const char *link_target, hid_t link_loc_id, const char *link_n loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = link_name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(link_loc_id); /* get the location object */ @@ -2740,6 +2750,8 @@ H5Lcreate_hard_ff(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, H5VL_object_t *obj2 = NULL; /* object token of loc_id */ H5VL_loc_params_t loc_params1; H5VL_loc_params_t loc_params2; + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5P_genplist_t *plist; /* Property list pointer */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2768,12 +2780,12 @@ H5Lcreate_hard_ff(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.obj_type = H5I_get_type(cur_loc_id); loc_params1.loc_data.loc_by_name.name = cur_name; - loc_params1.loc_data.loc_by_name.plist_id = lapl_id; + loc_params1.loc_data.loc_by_name.lapl_id = lapl_id; loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.obj_type = H5I_get_type(new_loc_id); loc_params2.loc_data.loc_by_name.name = new_name; - loc_params2.loc_data.loc_by_name.plist_id = lapl_id; + loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; if(H5L_SAME_LOC != cur_loc_id) { /* get the file object */ @@ -2868,7 +2880,7 @@ H5Ldelete_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t trans_id, hid_ loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.obj_type = H5I_get_type(loc_id); loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; /* store the transaction ID in the dxpl */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) @@ -2942,7 +2954,7 @@ H5Lexists_ff(hid_t loc_id, const char *name, hid_t lapl_id, hbool_t *ret, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.obj_type = H5I_get_type(loc_id); loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; /* get the file object */ if(NULL == (obj = (H5VL_object_t *)H5I_object(loc_id))) @@ -3015,7 +3027,7 @@ H5Lget_info_ff(hid_t loc_id, const char *name, H5L_ff_info_t *linfo , loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.obj_type = H5I_get_type(loc_id); loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; /* get the file object */ if(NULL == (obj = (H5VL_object_t *)H5I_object(loc_id))) @@ -3095,7 +3107,7 @@ H5Lget_val_ff(hid_t loc_id, const char *name, void *buf, size_t size, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.obj_type = H5I_get_type(loc_id); loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; /* get the file object */ if(NULL == (obj = (H5VL_object_t *)H5I_object(loc_id))) @@ -3157,8 +3169,6 @@ H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t rcxt_id) H5VL_object_t *obj = NULL; /* object token of loc_id */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ H5P_genplist_t *plist; /* Property list pointer */ - H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ - void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5I_type_t opened_type; H5VL_object_t *opened_obj = NULL; H5VL_loc_params_t loc_params; @@ -3172,7 +3182,7 @@ H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t rcxt_id) loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the file object */ @@ -3185,23 +3195,12 @@ H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t rcxt_id) if(H5P_set(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for rcxt_id") - if(estack_id != H5_EVENT_STACK_NULL) { - /* create the private request */ - if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - req = &request->req; - request->vol_cls = obj->vol_info->vol_cls; - } - /* Open the object through the VOL */ - if(NULL == (opened_obj = H5VL_object_open(obj->vol_obj, loc_params, obj->vol_info->vol_cls, &opened_type, - H5AC_dxpl_id, req))) + if(NULL == (opened_obj = (H5VL_object_t *)H5VL_object_open(obj->vol_obj, loc_params, + obj->vol_info->vol_cls, &opened_type, + H5AC_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object") - if(request && *req) - if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") - if((ret_value = H5VL_register_id(opened_type, opened_obj, obj->vol_info, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object handle") @@ -3271,6 +3270,7 @@ H5Oopen_by_token(const void *token, hid_t trans_id, hid_t estack_id) void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5I_type_t opened_type; void *opened_obj = NULL; + H5VL_t *vol_info = NULL; /* VOL info struct */ hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) @@ -3288,7 +3288,7 @@ H5Oopen_by_token(const void *token, hid_t trans_id, hid_t estack_id) if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); req = &request->req; - request->vol_cls = attr->vol_info->vol_cls; + request->vol_cls = tr->vol_cls; } if(NULL == (opened_obj = H5VL_iod_obj_open_token(token, tr, &opened_type, req))) @@ -3300,7 +3300,16 @@ H5Oopen_by_token(const void *token, hid_t trans_id, hid_t estack_id) if(H5ES_insert(estack_id, request) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") - if((ret_value = H5VL_register_id(opened_type, opened_obj, obj->vol_info, TRUE)) < 0) + /* setup VOL info struct */ + if(NULL == (vol_info = H5FL_CALLOC(H5VL_t))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate VL info struct") + vol_info->vol_cls = tr->vol_cls; + HDassert(tr->vol_cls->value == H5_VOL_IOD); + + if(H5I_inc_ref(vol_info->vol_id, FALSE) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, FAIL, "unable to increment ref count on VOL plugin") + + if((ret_value = H5VL_register_id(opened_type, opened_obj, vol_info, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object handle") done: @@ -3337,6 +3346,8 @@ H5Olink_ff(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, H5VL_object_t *obj2 = NULL; /* object token of loc_id */ H5VL_loc_params_t loc_params1; H5VL_loc_params_t loc_params2; + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5P_genplist_t *plist; /* Property list pointer */ hid_t dxpl_id = H5P_DATASET_XFER_DEFAULT; /* transfer property list to pass to the VOL plugin */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3368,7 +3379,7 @@ H5Olink_ff(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.obj_type = H5I_get_type(new_loc_id); loc_params2.loc_data.loc_by_name.name = new_name; - loc_params2.loc_data.loc_by_name.plist_id = lapl_id; + loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; if(H5L_SAME_LOC != obj_id) { /* get the file object */ @@ -3464,7 +3475,7 @@ H5Oexists_by_name_ff(hid_t loc_id, const char *name, hbool_t *ret, hid_t lapl_id loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the file object */ @@ -3608,7 +3619,7 @@ H5Oset_comment_by_name_ff(hid_t loc_id, const char *name, const char *comment, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the file object */ @@ -3743,7 +3754,7 @@ H5Oget_comment_by_name_ff(hid_t loc_id, const char *name, char *comment, size_t loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the file object */ @@ -3884,7 +3895,7 @@ H5Oget_info_by_name_ff(hid_t loc_id, const char *name, H5O_ff_info_t *oinfo, loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = name; - loc_params.loc_data.loc_by_name.plist_id = lapl_id; + loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); /* get the file object */ @@ -3953,7 +3964,7 @@ H5Oclose_ff(hid_t object_id, hid_t estack_id) case H5I_DATASET: case H5I_MAP: /* Check args */ - if(NULL == (obj == (H5VL_object_t *)H5I_object(group_id))) + if(NULL == (obj = (H5VL_object_t *)H5I_object(object_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid object ID") /* set the async request and dxpl IDs to be passed on to the VOL layer */ @@ -4644,11 +4655,8 @@ H5_DLL herr_t H5Aevict_ff(hid_t attr_id, uint64_t c_version, hid_t dxpl_id, hid_ FUNC_ENTER_API(FAIL) /* get the map object */ - if(NULL == (attr = (void *)H5I_object_verify(attr_id, H5I_ATTR))) + if(NULL == (attr = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid attribute identifier") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(attr_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Get correct property list */ if(H5P_DEFAULT == dxpl_id) @@ -4756,9 +4764,6 @@ H5_DLL herr_t H5Devict_ff(hid_t dset_id, uint64_t c_version, hid_t dxpl_id, hid_ /* get the map object */ if(NULL == (dset = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(dset_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Get correct property list */ if(H5P_DEFAULT == dxpl_id) @@ -4804,7 +4809,7 @@ H5_DLL herr_t H5Gprefetch_ff(hid_t grp_id, hid_t rcxt_id, hrpl_t *replica_id, hid_t dxpl_id, hid_t estack_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ - void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ H5VL_object_t *grp = NULL; /* pointer to grp object */ herr_t ret_value = SUCCEED; /* Return value */ @@ -4813,9 +4818,6 @@ H5_DLL herr_t H5Gprefetch_ff(hid_t grp_id, hid_t rcxt_id, hrpl_t *replica_id, /* get the map object */ if(NULL == (grp = (H5VL_object_t *)H5I_object_verify(grp_id, H5I_GROUP))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid group identifier") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(grp_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Get correct property list */ if(H5P_DEFAULT == dxpl_id) @@ -4926,7 +4928,7 @@ H5_DLL herr_t H5Tprefetch_ff(hid_t dtype_id, hid_t rcxt_id, hrpl_t *replica_id, if(NULL == (type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") /* Check if the datatype is committed */ - if((status = H5T_committed(type)) < 0) + if((status = H5T_is_named(type)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check whether datatype is committed") if(FALSE == status) { @@ -4991,7 +4993,7 @@ H5_DLL herr_t H5Tevict_ff(hid_t dtype_id, uint64_t c_version, hid_t dxpl_id, hid if(NULL == (type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") /* Check if the datatype is committed */ - if((status = H5T_committed(type)) < 0) + if((status = H5T_is_named(type)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check whether datatype is committed") if(FALSE == status) { @@ -5048,7 +5050,8 @@ H5VLiod_get_file_id(const char *filename, iod_handle_t coh, hid_t fapl_id, hid_t H5VL_iod_file_t *file = NULL; /* file token from VOL plugin */ H5P_genplist_t *plist; /* Property list pointer */ H5VL_class_t *vol_cls; /* VOL class attached to fapl_id */ - H5VL_t *vol_plugin; /* VOL plugin information */ + hid_t plugin_id; /* VOL plugin identigier attached to fapl_id */ + H5VL_t *vol_info; /* VOL plugin information */ iod_handles_t root_oh; /* root object handle */ iod_cont_trans_stat_t *tids = NULL; iod_trans_id_t rtid; @@ -5070,18 +5073,21 @@ H5VLiod_get_file_id(const char *filename, iod_handle_t coh, hid_t fapl_id, hid_t /* get info from the fapl */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); - if(H5P_get(plist, H5F_ACS_VOL_NAME, &vol_cls) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get vol plugin ID"); if(H5P_get(plist, H5VL_CS_BITFLAG_NAME, &cs_scope) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get scope for data integrity checks"); + if(H5P_get(plist, H5F_ACS_VOL_ID_NAME, &plugin_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get vol plugin ID") - /* Build the vol plugin struct */ - if(NULL == (vol_plugin = (H5VL_t *)H5MM_calloc(sizeof(H5VL_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - vol_plugin->cls = vol_cls; - vol_plugin->nrefs = 1; - if((vol_plugin->container_name = H5MM_xstrdup(filename)) == NULL) - HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed"); + if(NULL == (vol_cls = (H5VL_class_t *)H5I_object_verify(plugin_id, H5I_VOL))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL plugin ID") + + /* setup VOL info struct */ + if(NULL == (vol_info = H5FL_CALLOC(H5VL_t))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate VL info struct") + vol_info->vol_cls = vol_cls; + vol_info->vol_id = plugin_id; + if(H5I_inc_ref(vol_info->vol_id, FALSE) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, FAIL, "unable to increment ref count on VOL plugin") /* allocate the file object that is returned to the user */ if(NULL == (file = H5FL_CALLOC(H5VL_iod_file_t))) @@ -5175,7 +5181,7 @@ H5VLiod_get_file_id(const char *filename, iod_handle_t coh, hid_t fapl_id, hid_t file->common.file = file; /* Get an atom for the file with the VOL information as the auxilary struct*/ - if((ret_value = H5I_register2(H5I_FILE, file, vol_plugin, TRUE)) < 0) + if((ret_value = H5VL_register_id(H5I_FILE, file, vol_info, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") /* determine if we want to acquire the latest readable version @@ -5187,8 +5193,10 @@ H5VLiod_get_file_id(const char *filename, iod_handle_t coh, hid_t fapl_id, hid_t if(NULL == (rc = H5RC_create(file, rtid))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context"); + rc->vol_cls = vol_info->vol_cls; + /* Get an atom for the event queue with the VOL information as the auxilary struct */ - if((*rcxt_id = H5I_register2(H5I_RC, rc, vol_plugin, TRUE)) < 0) + if((*rcxt_id = H5I_register(H5I_RC, rc, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle"); } @@ -5213,27 +5221,19 @@ done: herr_t H5VLiod_close_file_id(hid_t file_id) { + H5VL_object_t *obj; H5VL_iod_file_t *file = NULL; /* file token from VOL plugin */ - H5VL_t *vol_plugin; /* VOL plugin information */ herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); - - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - vol_plugin->nrefs --; - if (0 == vol_plugin->nrefs) { - vol_plugin->container_name = (const char *)H5MM_xfree(vol_plugin->container_name); - vol_plugin = (H5VL_t *)H5MM_xfree(vol_plugin); - } - /* get the file object */ - if(NULL == (file = (H5VL_iod_file_t *)H5I_remove_verify(file_id, H5I_FILE))) + if(NULL == (obj = (H5VL_object_t *)H5I_remove_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + file = (H5VL_iod_file_t *)obj->vol_obj; + free(file->file_name); free(file->common.obj_name); if(H5FD_mpi_comm_info_free(&file->comm, &file->info) < 0) @@ -5247,6 +5247,10 @@ H5VLiod_close_file_id(hid_t file_id) HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "failed to close plist"); file = H5FL_FREE(H5VL_iod_file_t, file); + /* free file */ + if(H5VL_free_object(obj) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to free VOL object") + done: FUNC_LEAVE_API(ret_value) } /* end H5VLiod_close_file_id() */ @@ -5295,7 +5299,7 @@ H5Dquery_ff(hid_t dset_id, hid_t query_id, hid_t scope_id, hid_t rcxt_id) if (NULL == (idx_class = H5X_registered(plugin_id))) HGOTO_ERROR(H5E_INDEX, H5E_CANTGET, FAIL, "can't get index plugin class"); - if(NULL == (plist = H5I_object(H5P_INDEX_XFER_DEFAULT))) + if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_INDEX_XFER_DEFAULT))) HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); if((xxpl_id = H5P_copy_plist((H5P_genplist_t *)plist, TRUE)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property list"); @@ -5373,7 +5377,7 @@ H5Dquery_ff(hid_t dset_id, hid_t query_id, hid_t scope_id, hid_t rcxt_id) ret_value = udata.space_query; { - hsize_t start_coord[H5S_MAX_RANK + 1], end_coord[H5S_MAX_RANK + 1], nelmts; + hsize_t start_coord[H5S_MAX_RANK + 1], end_coord[H5S_MAX_RANK + 1]; if (FAIL == H5Sget_select_bounds(ret_value, start_coord, end_coord)) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to get bounds"); diff --git a/src/H5M.c b/src/H5M.c index 05b1b01..8696207 100644 --- a/src/H5M.c +++ b/src/H5M.c @@ -54,7 +54,7 @@ /* Local Prototypes */ /********************/ -static herr_t H5M_close_map(void *map, H5VL_t *vol_plugin); +static herr_t H5M_close_map(void *map); /*********************/ /* Package Variables */ @@ -160,14 +160,19 @@ H5M_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - if((n = H5I_nmembers(H5I_MAP))>0) { - (void)H5I_clear_type(H5I_MAP, FALSE, FALSE); - } else { + if(H5I_nmembers(H5I_MAP) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ + } /* end if */ + else { + /* Destroy the dataspace object id group */ (void)H5I_dec_type_ref(H5I_MAP); + n++; /*H5I*/ + + /* Shut down interface */ H5_interface_initialize_g = 0; - n = 1; - } - } + } /* end else */ + } /* end if */ FUNC_LEAVE_NOAPI(n) } /* H5M_term_interface() */ @@ -743,7 +748,7 @@ H5Mdelete_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, } /* delete the key pair through the IOD VOL */ - if((ret_value = H5VL_iod_map_delete(map->obj, key_mem_type_id, key, trans_id, req)) < 0) + if((ret_value = H5VL_iod_map_delete(map->vol_obj, key_mem_type_id, key, trans_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) @@ -944,7 +949,7 @@ H5_DLL herr_t H5Mevict_ff(hid_t map_id, uint64_t c_version, hid_t dxpl_id, hid_t } /* Get the data through the IOD VOL */ - if((ret_value = H5VL_iod_evict(map->obj, c_version, dxpl_id, req)) < 0) + if((ret_value = H5VL_iod_evict(map->vol_obj, c_version, dxpl_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't evict map") if(request && *req) diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 5985d87..044bae6 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -43,6 +43,7 @@ #include "H5PLprivate.h" /* Dynamic plugin */ #include "H5Zprivate.h" /* Filter pipeline */ +#include "H5VLiod.h" /* Iod VOL plugin */ /****************/ /* Local Macros */ diff --git a/src/H5Pvcpl.c b/src/H5Pvcpl.c index a3b1af0..4e0a06e 100644 --- a/src/H5Pvcpl.c +++ b/src/H5Pvcpl.c @@ -153,7 +153,7 @@ done: */ /* ARGSUSED */ herr_t -H5P_dataspace_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value) +H5P_dataspace_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { hid_t space_id; herr_t ret_value = SUCCEED; @@ -187,7 +187,7 @@ done: */ /* ARGSUSED */ herr_t -H5P_dataspace_copy(const char UNUSED *name, size_t UNUSED size, void *value) +H5P_dataspace_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { hid_t space_id; herr_t ret_value = SUCCEED; @@ -232,7 +232,7 @@ done: *------------------------------------------------------------------------- */ int -H5P_dataspace_cmp(const void *value1, const void *value2, size_t UNUSED size) +H5P_dataspace_cmp(const void *value1, const void *value2, size_t H5_ATTR_UNUSED size) { const hid_t *space1_id = (const hid_t *)value1; const hid_t *space2_id = (const hid_t *)value2; @@ -276,7 +276,7 @@ done: */ /* ARGSUSED */ herr_t -H5P_dataspace_close(const char UNUSED *name, size_t UNUSED size, void *value) +H5P_dataspace_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { hid_t space_id; herr_t ret_value = SUCCEED; diff --git a/src/H5Q.c b/src/H5Q.c index 92352a0..7bdbd7f 100644 --- a/src/H5Q.c +++ b/src/H5Q.c @@ -100,7 +100,7 @@ static herr_t H5Q_apply_attr_name(H5Q_t *query, hbool_t *result, static herr_t H5Q_apply_link_name(H5Q_t *query, hbool_t *result, const char *name); -static H5_inline void +static void H5Q_encode_memcpy(unsigned char **buf_ptr, size_t *nalloc, const void *data, size_t data_size) { @@ -111,7 +111,7 @@ H5Q_encode_memcpy(unsigned char **buf_ptr, size_t *nalloc, const void *data, *nalloc += data_size; } -static H5_inline void +static void H5Q_decode_memcpy(void *data, size_t data_size, const unsigned char **buf_ptr) { if (*buf_ptr != NULL) { @@ -140,8 +140,7 @@ static const H5I_class_t H5I_QUERY_CLS[1] = {{ H5I_QUERY, /* Class ID for the type */ 0, /* Class behavior flags */ 0, /* Number of reserved IDs for this type */ - (H5I_free_t)H5Q_close, /* Free function for object's of this type */ - NULL /* Free function for auxilary objects of this type */ + (H5I_free_t)H5Q_close /* Free function for object's of this type */ }}; /*------------------------------------------------------------------------- @@ -217,18 +216,19 @@ H5Q_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR - if (H5_interface_initialize_g) { - if ((n = H5I_nmembers(H5I_QUERY))) { - H5I_clear_type(H5I_QUERY, FALSE, FALSE); - } /* end if */ + if(H5_interface_initialize_g) { + if(H5I_nmembers(H5I_QUERY) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ + } /* end if */ else { - /* Free data types */ - H5I_dec_type_ref(H5I_QUERY); + /* Destroy the dataspace object id group */ + (void)H5I_dec_type_ref(H5I_QUERY); + n++; /*H5I*/ - /* Shut down interface */ - H5_interface_initialize_g = 0; - n = 1; /* H5I */ - } /* end else */ + /* Shut down interface */ + H5_interface_initialize_g = 0; + } /* end else */ } /* end if */ FUNC_LEAVE_NOAPI(n) @@ -1135,7 +1135,7 @@ H5Qapply(hid_t query_id, hbool_t *result, ...) { H5Q_t *query = NULL; H5T_t *native_type = NULL; - hid_t ret_value; + herr_t ret_value; va_list ap; FUNC_ENTER_API(FAIL) @@ -1234,7 +1234,7 @@ H5Qapply_combine(hid_t query_id, hbool_t *result, hid_t type_id, const void *val { H5Q_t *query = NULL; H5T_t *type = NULL, *native_type = NULL; - hid_t ret_value; + herr_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE4("e", "i*bi*x", query_id, result, type_id, value); diff --git a/src/H5RC.c b/src/H5RC.c index 008e709..6c0c421 100644 --- a/src/H5RC.c +++ b/src/H5RC.c @@ -80,8 +80,7 @@ static const H5I_class_t H5I_RC_CLS[1] = {{ H5I_RC, /* ID class value */ 0, /* Class flags */ 2, /* # of reserved IDs for class */ - (H5I_free_t)H5RC_close, /* Callback routine for closing objects of this class */ - NULL /* Callback routine for closing auxilary objects of this class */ + (H5I_free_t)H5RC_close /* Callback routine for closing objects of this class */ }}; @@ -165,16 +164,17 @@ H5RC_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - if((n = H5I_nmembers(H5I_RC))) { - H5I_clear_type(H5I_RC, FALSE, FALSE); + if(H5I_nmembers(H5I_RC) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ } /* end if */ else { - /* Free data types */ - H5I_dec_type_ref(H5I_RC); + /* Destroy the dataspace object id group */ + (void)H5I_dec_type_ref(H5I_RC); + n++; /*H5I*/ /* Shut down interface */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ } /* end else */ } /* end if */ @@ -276,8 +276,7 @@ done: hid_t H5RCcreate(hid_t file_id, uint64_t c_version) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; + H5VL_object_t *file = NULL; H5RC_t *rc = NULL; hid_t ret_value; @@ -285,18 +284,17 @@ H5RCcreate(hid_t file_id, uint64_t c_version) H5TRACE2("i", "iIl", file_id, c_version); /* get the file object */ - if(NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (file = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* create a new read context object */ if(NULL == (rc = H5RC_create(file, c_version))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context") - /* Get an atom for the event queue with the VOL information as the auxilary struct*/ - if((ret_value = H5I_register2(H5I_RC, rc, vol_plugin, TRUE)) < 0) + rc->vol_cls = file->vol_info->vol_cls; + + /* Get an atom for the RC */ + if((ret_value = H5I_register(H5I_RC, rc, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle") done: @@ -387,8 +385,7 @@ hid_t H5RCacquire(hid_t file_id, uint64_t *c_version, hid_t rcapl_id, hid_t estack_id) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; + H5VL_object_t *file = NULL; H5RC_t *rc = NULL; H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -399,11 +396,8 @@ H5RCacquire(hid_t file_id, uint64_t *c_version, H5TRACE4("i", "i*Ilii", file_id, c_version, rcapl_id, estack_id); /* get the file object */ - if(NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (file = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Get correct property list */ if(H5P_DEFAULT == rcapl_id) @@ -417,28 +411,25 @@ H5RCacquire(hid_t file_id, uint64_t *c_version, might be changed if the version is not available for read. */ if(NULL == (rc = H5RC_create(file, *c_version))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context") - /* Get an atom for the event queue with the VOL information as the auxilary struct*/ - if((rc_id = H5I_register2(H5I_RC, rc, vol_plugin, TRUE)) < 0) + rc->vol_cls = file->vol_info->vol_cls; + /* Get an atom for the RC*/ + if((rc_id = H5I_register(H5I_RC, rc, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle") if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = rc->vol_cls; } if(H5VL_iod_rc_acquire((H5VL_iod_file_t *)file, rc, c_version, rcapl_id, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a read context on container"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") - } ret_value = rc_id; @@ -470,7 +461,6 @@ herr_t H5RCrelease(hid_t rc_id , hid_t estack_id) { H5RC_t *rc = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -482,28 +472,20 @@ H5RCrelease(hid_t rc_id , hid_t estack_id) if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(rc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = rc->vol_cls; } if(H5VL_iod_rc_release(rc, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a release on a read context on container"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -527,7 +509,6 @@ herr_t H5RCpersist(hid_t rc_id , hid_t estack_id) { H5RC_t *rc = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -539,28 +520,20 @@ H5RCpersist(hid_t rc_id , hid_t estack_id) if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(rc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = rc->vol_cls; } if(H5VL_iod_rc_persist(rc, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a persist on a read context on container"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -584,7 +557,6 @@ herr_t H5RCsnapshot(hid_t rc_id , const char *snapshot_name, hid_t estack_id) { H5RC_t *rc = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -600,28 +572,20 @@ H5RCsnapshot(hid_t rc_id , const char *snapshot_name, hid_t estack_id) if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(rc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = rc->vol_cls; } if(H5VL_iod_rc_snapshot(rc, snapshot_name, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a snapshot on a read context on container"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5RCprivate.h b/src/H5RCprivate.h index a280ff9..0932b92 100644 --- a/src/H5RCprivate.h +++ b/src/H5RCprivate.h @@ -51,6 +51,7 @@ typedef struct H5RC_t { H5VL_iod_req_info_t req_info; /* must be first */ struct H5VL_iod_file_t *file; uint64_t c_version; + const H5VL_class_t *vol_cls; /* the vol plugin class that gnerated this request */ } H5RC_t; /*****************************/ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index bc83154..0f319e9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8887,11 +8887,10 @@ H5Sselect_is_regular(hid_t space_id) /* Rebuild diminfo if it is invalid and has not been confirmed to be * impossible */ - if(space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO) { + if(space->select.sel_info.hslab->diminfo_valid == FALSE) (void)H5S_hyper_rebuild((H5S_t *)space); - } - if(space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) + if(space->select.sel_info.hslab->diminfo_valid == TRUE) ret_value = TRUE; else ret_value = FALSE; @@ -8926,16 +8925,14 @@ H5Sget_reg_hyperslab_params(hid_t space_id, hsize_t start[], hsize_t stride[], /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") - if(space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_IMPOSSIBLE) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "not a regular hyperslab selection") /* Rebuild diminfo if it is invalid and has not been confirmed to be * impossible */ - if(space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO) { + if(space->select.sel_info.hslab->diminfo_valid == FALSE) { (void)H5S_hyper_rebuild((H5S_t *)space); } - if(space->select.sel_info.hslab->diminfo_valid != H5S_DIMINFO_VALID_YES) { + if(space->select.sel_info.hslab->diminfo_valid != TRUE) { HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "not a regular hyperslab selection") } diff --git a/src/H5T.c b/src/H5T.c index dd8fb4e..6cc5307 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1712,7 +1712,7 @@ H5Tclose(hid_t type_id) /* get the plugin pointer - * if it exists, then we know that the datatype is committed, * so we attach synchronous request to it so it can pass through the VL layer. */ - if(NULL != (obj = (H5VL_object_t *)type->vol_obj)) { + if(NULL != (obj = (H5VL_object_t *)dt->vol_obj)) { obj->close_estack_id = H5_EVENT_STACK_NULL; obj->close_dxpl_id = H5AC_dxpl_id; } diff --git a/src/H5TR.c b/src/H5TR.c index 8bdc8b5..392dc00 100644 --- a/src/H5TR.c +++ b/src/H5TR.c @@ -81,8 +81,7 @@ static const H5I_class_t H5I_TR_CLS[1] = {{ H5I_TR, /* ID class value */ 0, /* Class flags */ 2, /* # of reserved IDs for class */ - (H5I_free_t)H5TR_close, /* Callback routine for closing objects of this class */ - NULL /* Callback routine for closing auxilary objects of this class */ + (H5I_free_t)H5TR_close /* Callback routine for closing objects of this class */ }}; @@ -166,16 +165,17 @@ H5TR_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - if((n = H5I_nmembers(H5I_TR))) { - H5I_clear_type(H5I_TR, FALSE, FALSE); + if(H5I_nmembers(H5I_TR) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ } /* end if */ else { - /* Free data types */ - H5I_dec_type_ref(H5I_TR); + /* Destroy the dataspace object id group */ + (void)H5I_dec_type_ref(H5I_TR); + n++; /*H5I*/ /* Shut down interface */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ } /* end else */ } /* end if */ @@ -288,8 +288,7 @@ done: hid_t H5TRcreate(hid_t file_id, hid_t rc_id, uint64_t trans_num) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; + H5VL_object_t *file = NULL; H5TR_t *tr = NULL; H5RC_t *rc = NULL; hid_t ret_value; @@ -298,21 +297,20 @@ H5TRcreate(hid_t file_id, hid_t rc_id, uint64_t trans_num) H5TRACE3("i", "iiIl", file_id, rc_id, trans_num); /* get the file object */ - if(NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (file = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* get the Read Context object */ if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a read context ID") + tr->vol_cls = file->vol_info->vol_cls; + /* create a new transaction object */ if(NULL == (tr = H5TR_create(file, rc, trans_num))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create transaction object") - /* Get an atom for the event queue with the VOL information as the auxilary struct*/ - if((ret_value = H5I_register2(H5I_TR, tr, vol_plugin, TRUE)) < 0) + /* Get an atom for the TR */ + if((ret_value = H5I_register(H5I_TR, tr, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize transaction handle") done: @@ -419,7 +417,6 @@ herr_t H5TRstart(hid_t tr_id, hid_t trspl_id, hid_t estack_id) { H5TR_t *tr = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -438,28 +435,20 @@ H5TRstart(hid_t tr_id, hid_t trspl_id, hid_t estack_id) if(TRUE != H5P_isa_class(trspl_id, H5P_TR_START)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not transaction start property list") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(tr_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = tr->vol_cls; } if(H5VL_iod_tr_start(tr, trspl_id, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction start"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -489,7 +478,6 @@ H5TRfinish(hid_t tr_id, hid_t trfpl_id, hid_t *rcxt_id, hid_t estack_id) H5TR_t *tr = NULL; H5RC_t *rc = NULL; hbool_t acquire = FALSE; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -508,10 +496,6 @@ H5TRfinish(hid_t tr_id, hid_t trfpl_id, hid_t *rcxt_id, hid_t estack_id) if(TRUE != H5P_isa_class(trfpl_id, H5P_TR_FINISH)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not transaction finish property list") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(tr_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - /* create a new read context object (if user requested it) with the provided transaction number to finish */ if(rcxt_id) { @@ -519,8 +503,11 @@ H5TRfinish(hid_t tr_id, hid_t trfpl_id, hid_t *rcxt_id, hid_t estack_id) if(NULL == (rc = H5RC_create(tr->file, tr->trans_num))) HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context"); - /* Get an atom for the event queue with the VOL information as the auxilary struct */ - if((*rcxt_id = H5I_register2(H5I_RC, rc, vol_plugin, TRUE)) < 0) + + rc->vol_cls = tr->vol_cls; + + /* Get an atom for the RC */ + if((*rcxt_id = H5I_register(H5I_RC, rc, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle"); } @@ -528,20 +515,16 @@ H5TRfinish(hid_t tr_id, hid_t trfpl_id, hid_t *rcxt_id, hid_t estack_id) /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = tr->vol_cls; } if(H5VL_iod_tr_finish(tr, acquire, trfpl_id, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction finish"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -568,7 +551,6 @@ herr_t H5TRset_dependency(hid_t tr_id, uint64_t trans_num, hid_t estack_id) { H5TR_t *tr = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -583,28 +565,20 @@ H5TRset_dependency(hid_t tr_id, uint64_t trans_num, hid_t estack_id) if(tr->trans_num <= trans_num) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The dependent transaction must be higher than the one it depends on") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(tr_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = tr->vol_cls; } if(H5VL_iod_tr_set_dependency(tr, trans_num, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction set_dependency"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -627,8 +601,7 @@ done: herr_t H5TRskip(hid_t file_id, uint64_t start_trans_num, uint64_t count, hid_t estack_id) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ + H5VL_object_t *file = NULL; H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -637,31 +610,23 @@ H5TRskip(hid_t file_id, uint64_t start_trans_num, uint64_t count, hid_t estack_i H5TRACE4("e", "iIlIli", file_id, start_trans_num, count, estack_id); /* get the file object */ - if(NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (file = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") - if(estack_id != H5_EVENT_STACK_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = file->vol_info->vol_cls; } - if(H5VL_iod_tr_skip((H5VL_iod_file_t *)file, start_trans_num, count, req) < 0) + if(H5VL_iod_tr_skip((H5VL_iod_file_t *)file->vol_obj, start_trans_num, count, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction skip"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) @@ -685,7 +650,6 @@ herr_t H5TRabort(hid_t tr_id, hid_t estack_id) { H5TR_t *tr = NULL; - H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; @@ -693,10 +657,6 @@ H5TRabort(hid_t tr_id, hid_t estack_id) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ii", tr_id, estack_id); - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(tr_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - /* get the TR object */ if(NULL == (tr = (H5TR_t *)H5I_object_verify(tr_id, H5I_TR))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Transaction ID") @@ -705,20 +665,16 @@ H5TRabort(hid_t tr_id, hid_t estack_id) /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - request->req = NULL; req = &request->req; - request->next = NULL; - request->vol_plugin = vol_plugin; - vol_plugin->nrefs ++; + request->vol_cls = tr->vol_cls; } if(H5VL_iod_tr_abort(tr, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction abort"); - if(request && *req) { + if(request && *req) if(H5ES_insert(estack_id, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack"); - } + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack") done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5TRprivate.h b/src/H5TRprivate.h index 70f5e5e..fc59f97 100644 --- a/src/H5TRprivate.h +++ b/src/H5TRprivate.h @@ -41,6 +41,7 @@ typedef struct H5TR_t { struct H5VL_iod_file_t *file; uint64_t c_version; uint64_t trans_num; + const H5VL_class_t *vol_cls; /* the vol plugin class that gnerated this request */ } H5TR_t; /*****************************/ diff --git a/src/H5V.c b/src/H5V.c index ba89f41..fad832b 100644 --- a/src/H5V.c +++ b/src/H5V.c @@ -160,14 +160,20 @@ H5V_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - if((n = H5I_nmembers(H5I_VIEW))>0) { - (void)H5I_clear_type(H5I_VIEW, FALSE, FALSE); - } else { + if(H5I_nmembers(H5I_VIEW) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + n++; /*H5I*/ + } /* end if */ + else { + /* Destroy the dataspace object id group */ (void)H5I_dec_type_ref(H5I_VIEW); + n++; /*H5I*/ + + /* Shut down interface */ H5_interface_initialize_g = 0; - n = 1; - } - } + } /* end else */ + } /* end if */ + FUNC_LEAVE_NOAPI(n) } /* H5V_term_interface() */ @@ -320,7 +326,7 @@ H5Vcreate_ff(hid_t loc_id, hid_t query_id, hid_t vcpl_id, hid_t rcxt_id, hid_t e if(NULL == (obj = H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object/file identifier") - if(vol_plugin->cls->value != H5_VOL_IOD) + if(obj->vol_info->vol_cls->value != H5_VOL_IOD) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "only IOD plugin supports VIEW objects for now") if(estack_id != H5_EVENT_STACK_NULL) { @@ -554,10 +560,6 @@ H5Vget_elem_regions_ff(hid_t view_id, hsize_t start, hsize_t count, hid_t datase if(start >= view->remote_view.region_info.count || start+count > view->remote_view.region_info.count) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "start/count out of range") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(view_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - for(i=start; i= view->remote_view.obj_info.count || start+count > view->remote_view.obj_info.count) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "start/count out of range") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(view_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - for(i=start; inrefs ++; /* create hid_t for opened object */ if((obj_id[k] = H5VL_register_id(opened_type, opened_obj, obj->vol_info, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object handle"); @@ -703,10 +700,6 @@ H5Vget_attrs_ff(hid_t view_id, hsize_t start, hsize_t count, hid_t attr_id[], hi if(start >= view->remote_view.attr_info.count || start+count > view->remote_view.attr_info.count) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "start/count out of range") - /* get the plugin pointer */ - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(view_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); - for(i=start; inrefs ++; /* create hid_t for opened object */ if((attr_id[k] = H5VL_register_id(opened_type, opened_obj, obj->vol_info, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object handle"); diff --git a/src/H5VLiod.c b/src/H5VLiod.c index 31ccb21..32c27a4 100644 --- a/src/H5VLiod.c +++ b/src/H5VLiod.c @@ -22,6 +22,7 @@ */ #define H5P_PACKAGE /*suppress error about including H5Ppkg */ +#define H5O_PACKAGE /*suppress error about including H5Opkg */ /* Interface initialization */ #define H5_INTERFACE_INIT_FUNC H5VL_iod_init_interface @@ -32,6 +33,7 @@ #include "H5FFprivate.h" /* Fast Forward */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ #include "H5Ppkg.h" /* Property lists */ #include "H5Sprivate.h" /* Dataspaces */ @@ -56,10 +58,7 @@ static int coresident = 0; static AXE_task_t g_axe_id; static H5VL_iod_axe_list_t axe_list; -/* - * The vol identification number. - */ -static hid_t H5VL_IOD_g = 0; +hid_t H5VL_IOD_g = 0; /* function shipper IDs for different routines */ hg_id_t H5VL_EFF_INIT_ID; @@ -191,7 +190,6 @@ static herr_t H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H /* Object callbacks */ static void *H5VL_iod_object_open(void *obj, H5VL_loc_params_t loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req); -static herr_t H5VL_iod_object_get(void *obj, H5VL_loc_params_t loc_params, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments); static herr_t H5VL_iod_object_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments); static herr_t H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list arguments); @@ -277,9 +275,9 @@ static H5VL_class_t H5VL_iod_g = { { /* object_cls */ H5VL_iod_object_open, /* open */ NULL, /* copy */ - H5VL_iod_object_get, /* get */ - H5VL_iod_object_specific, /* specific */ - H5VL_iod_object_optional /* optional */ + NULL, /* get */ + H5VL_iod_object_specific, /* specific */ + H5VL_iod_object_optional /* optional */ }, { H5VL_iod_cancel, @@ -4722,9 +4720,9 @@ H5VL_iod_link_create(H5VL_link_create_type_t create_type, void *_obj, H5VL_loc_p H5VL_iod_object_t *target_obj = NULL; H5VL_loc_params_t target_params; - if(H5P_get(plist, H5VL_PROP_LINK_TARGET, &cur_obj) < 0) + if(H5P_get(plist, H5VL_PROP_LINK_TARGET, &target_obj) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for current location id") - if(H5P_get(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &cur_params) < 0) + if(H5P_get(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &target_params) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for current name") /* object is H5L_SAME_LOC */ @@ -4820,7 +4818,7 @@ H5VL_iod_link_create(H5VL_link_create_type_t create_type, void *_obj, H5VL_loc_p target_params.type = H5VL_OBJECT_BY_NAME; target_params.loc_data.loc_by_name.name = target_name; - target_params.loc_data.loc_by_name.plist_id = lapl_id; + target_params.loc_data.loc_by_name.lapl_id = lapl_id; if('/' == *target_name) { /* The target location object is the file root */ @@ -5387,30 +5385,54 @@ H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_link_speci H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; H5VL_iod_request_t **parent_reqs = NULL; size_t num_parents = 0; - hid_t rcxt_id; - H5RC_t *rc = NULL; H5P_genplist_t *plist = NULL; - iod_obj_id_t iod_id; - iod_handles_t iod_oh; char *loc_name = NULL; + link_op_in_t input; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT + if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + switch (specific_type) { /* H5Lexists */ case H5VL_LINK_EXISTS: { - H5VL_iod_request_t **parent_reqs = NULL; - size_t num_parents = 0; + htri_t *ret = va_arg (arguments, htri_t *); hid_t rcxt_id; H5RC_t *rc = NULL; - H5P_genplist_t *plist = NULL; - iod_obj_id_t iod_id; - iod_handles_t iod_oh; - char *loc_name = NULL; - link_op_in_t input; - htri_t *ret = va_arg (arguments, htri_t *); + + /* get the context ID */ + if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID"); + + /* allocate parent request array */ + if(NULL == (parent_reqs = (H5VL_iod_request_t **) + H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* retrieve parent requests */ + if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)rc, parent_reqs, &num_parents) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); + + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &input.loc_id, &input.loc_oh, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + + /* MSC - If location object not opened yet, wait for it. */ + if(IOD_OBJ_INVALID == input.loc_id) { + /* Synchronously wait on the request attached to the dataset */ + if(H5VL_iod_request_wait(obj->file, obj->request) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); + obj->request = NULL; + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &input.loc_id, &input.loc_oh, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + } if(H5VL_OBJECT_BY_SELF == loc_params.type) loc_name = strdup("."); @@ -5419,8 +5441,6 @@ H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_link_speci /* set the input structure for the HG encode routine */ input.coh = obj->file->remote_file.coh; - input.loc_id = iod_id; - input.loc_oh = iod_oh; input.rcxt_num = rc->c_version; input.cs_scope = obj->file->md_integrity_scope; input.trans_num = 0; @@ -5436,27 +5456,17 @@ H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_link_speci (H5VL_iod_req_info_t *)rc, &input, ret, ret, req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship link exists"); - if(loc_name) - HDfree(loc_name); break; } case H5VL_LINK_DELETE: { - link_op_in_t input; - H5VL_iod_request_t **parent_reqs = NULL; - size_t num_parents = 0; hid_t trans_id; H5TR_t *tr = NULL; - H5P_genplist_t *plist = NULL; int *status = NULL; - char *loc_name = NULL; /* get the transaction ID */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); if(H5P_get(plist, H5VL_TRANS_ID, &trans_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); - /* get the TR object */ if(NULL == (tr = (H5TR_t *)H5I_object_verify(trans_id, H5I_TR))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Transaction ID"); @@ -5509,9 +5519,6 @@ H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_link_speci (H5VL_iod_req_info_t *)tr, &input, status, status, req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship link remove"); - if(loc_name) - HDfree(loc_name); - break; } @@ -5521,6 +5528,8 @@ H5VL_iod_link_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_link_speci } done: + if(loc_name) + HDfree(loc_name); FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_link_specific() */ @@ -5906,6 +5915,24 @@ H5VL_iod_obj_open_token(const void *token, H5TR_t *tr, H5I_type_t *opened_type, ret_value = (void *)map; *opened_type = H5I_MAP; break; + case H5I_UNINIT: + case H5I_BADID: + case H5I_FILE: + case H5I_DATASPACE: + case H5I_REFERENCE: + case H5I_VFL: + case H5I_VOL: + case H5I_ES: + case H5I_RC: + case H5I_TR: + case H5I_QUERY: + case H5I_VIEW: + case H5I_GENPROP_CLS: + case H5I_GENPROP_LST: + case H5I_ERROR_CLASS: + case H5I_ERROR_MSG: + case H5I_ERROR_STACK: + case H5I_NTYPES: default: HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "not a valid file object (dataset, map, group, or datatype)"); } @@ -6002,7 +6029,25 @@ done: if(map) map = H5FL_FREE(H5VL_iod_map_t, map); break; - default: + case H5I_UNINIT: + case H5I_BADID: + case H5I_FILE: + case H5I_DATASPACE: + case H5I_REFERENCE: + case H5I_VFL: + case H5I_VOL: + case H5I_ES: + case H5I_RC: + case H5I_TR: + case H5I_QUERY: + case H5I_VIEW: + case H5I_GENPROP_CLS: + case H5I_GENPROP_LST: + case H5I_ERROR_CLASS: + case H5I_ERROR_MSG: + case H5I_ERROR_STACK: + case H5I_NTYPES: + default: HDONE_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "not a valid object type"); } /* end switch */ } /* end if */ @@ -7145,10 +7190,7 @@ H5VL_iod_object_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_object_s H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; iod_obj_id_t iod_id, mdkv_id, attrkv_id; iod_handles_t iod_oh; - int *status = NULL; size_t num_parents = 0; - hid_t trans_id; - H5TR_t *tr = NULL; H5P_genplist_t *plist = NULL; H5VL_iod_request_t **parent_reqs = NULL; char *loc_name = NULL; @@ -7159,44 +7201,46 @@ H5VL_iod_object_specific(void *_obj, H5VL_loc_params_t loc_params, H5VL_object_s /* get the transaction ID */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); - if(H5P_get(plist, H5VL_TRANS_ID, &trans_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); - /* get the TR object */ - if(NULL == (tr = (H5TR_t *)H5I_object_verify(trans_id, H5I_TR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Transaction ID") - - /* allocate parent request array */ - if(NULL == (parent_reqs = (H5VL_iod_request_t **) - H5MM_malloc(sizeof(H5VL_iod_request_t *) * 2))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); - - /* retrieve parent requests */ - if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)tr, parent_reqs, &num_parents) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); - - /* retrieve IOD info of location object */ - if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); - - /* MSC - If location object not opened yet, wait for it. */ - if(IOD_OBJ_INVALID == iod_id) { - /* Synchronously wait on the request attached to the dataset */ - if(H5VL_iod_request_wait(obj->file, obj->request) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); - obj->request = NULL; - /* retrieve IOD info of location object */ - if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); - } - - switch (misc_type) { + switch (specific_type) { /* H5Oexists_by_name */ case H5VL_OBJECT_EXISTS: { htri_t *ret = va_arg (arguments, htri_t *); + hid_t rcxt_id; + H5RC_t *rc = NULL; object_op_in_t input; + if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID"); + + /* allocate parent request array */ + if(NULL == (parent_reqs = (H5VL_iod_request_t **) + H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* retrieve parent requests */ + if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)rc, parent_reqs, &num_parents) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); + + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + + /* MSC - If location object not opened yet, wait for it. */ + if(IOD_OBJ_INVALID == iod_id) { + /* Synchronously wait on the request attached to the dataset */ + if(H5VL_iod_request_wait(obj->file, obj->request) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); + obj->request = NULL; + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + } + if(H5VL_OBJECT_BY_SELF == loc_params.type) loc_name = strdup("."); else if(H5VL_OBJECT_BY_NAME == loc_params.type) @@ -7239,43 +7283,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5VL_iod_object_get - * - * Purpose: Gets certain data about a file - * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Mohamad Chaarawi - * November, 2012 - * - *------------------------------------------------------------------------- - */ -herr_t -H5VL_iod_object_get(void *_obj, H5VL_loc_params_t loc_params, H5VL_object_get_t get_type, - hid_t dxpl_id, void **req, va_list arguments) -{ - H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; - size_t num_parents = 0; - hid_t rcxt_id; - H5RC_t *rc = NULL; - H5P_genplist_t *plist = NULL; - iod_obj_id_t iod_id, mdkv_id, attrkv_id; - iod_handles_t iod_oh; - H5VL_iod_request_t **parent_reqs = NULL; - char *loc_name = NULL; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from object") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_object_get() */ - - -/*------------------------------------------------------------------------- * Function: H5VL_iod_object_optional * * Purpose: Gets certain data about a file @@ -7295,8 +7302,6 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument H5VL_loc_params_t loc_params = va_arg(arguments, H5VL_loc_params_t); H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; size_t num_parents = 0; - hid_t rcxt_id; - H5RC_t *rc = NULL; H5P_genplist_t *plist = NULL; iod_obj_id_t iod_id, mdkv_id, attrkv_id; iod_handles_t iod_oh; @@ -7306,44 +7311,15 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument FUNC_ENTER_NOAPI_NOINIT - /* get the context ID */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); - if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); - - /* get the RC object */ - if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID"); - - /* allocate parent request array */ - if(NULL == (parent_reqs = (H5VL_iod_request_t **) - H5MM_malloc(sizeof(H5VL_iod_request_t *)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); - - /* retrieve parent requests */ - if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)rc, parent_reqs, &num_parents) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); - - /* retrieve IOD info of location object */ - if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); - - /* MSC - If location object not opened yet, wait for it. */ - if(IOD_OBJ_INVALID == iod_id) { - /* Synchronously wait on the request attached to the dataset */ - if(H5VL_iod_request_wait(obj->file, obj->request) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); - obj->request = NULL; - /* retrieve IOD info of location object */ - if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); - } switch (optional_type) { /* H5Oget_comment / H5Oget_comment_by_name */ case H5VL_OBJECT_GET_COMMENT: { + hid_t rcxt_id; + H5RC_t *rc = NULL; char *comment = va_arg (arguments, char *); size_t size = va_arg (arguments, size_t); ssize_t *ret = va_arg (arguments, ssize_t *); @@ -7351,6 +7327,37 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument object_get_comment_out_t *result = NULL; size_t len; + /* get the context ID */ + if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID"); + + /* allocate parent request array */ + if(NULL == (parent_reqs = (H5VL_iod_request_t **) + H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* retrieve parent requests */ + if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)rc, parent_reqs, &num_parents) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); + + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + + /* MSC - If location object not opened yet, wait for it. */ + if(IOD_OBJ_INVALID == iod_id) { + /* Synchronously wait on the request attached to the dataset */ + if(H5VL_iod_request_wait(obj->file, obj->request) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); + obj->request = NULL; + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + } + /* If the comment is present locally, get it and return */ if(loc_params.type == H5VL_OBJECT_BY_SELF && obj->comment) { len = HDstrlen(obj->comment); @@ -7404,17 +7411,47 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument obj, 0, num_parents, parent_reqs, (H5VL_iod_req_info_t *)rc, &input, result, result, req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship object get_comment"); - - if(loc_name) - HDfree(loc_name); break; } /* H5Oget_info / H5Oget_info_by_name / H5Oget_info_by_idx */ case H5VL_OBJECT_GET_INFO: { + hid_t rcxt_id; + H5RC_t *rc = NULL; H5O_ff_info_t *oinfo = va_arg (arguments, H5O_ff_info_t *); object_op_in_t input; + /* get the context ID */ + if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID"); + + /* allocate parent request array */ + if(NULL == (parent_reqs = (H5VL_iod_request_t **) + H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* retrieve parent requests */ + if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)rc, parent_reqs, &num_parents) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); + + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + + /* MSC - If location object not opened yet, wait for it. */ + if(IOD_OBJ_INVALID == iod_id) { + /* Synchronously wait on the request attached to the dataset */ + if(H5VL_iod_request_wait(obj->file, obj->request) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); + obj->request = NULL; + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + } + if(H5VL_OBJECT_BY_SELF == loc_params.type) loc_name = strdup("."); else if(H5VL_OBJECT_BY_NAME == loc_params.type) @@ -7439,9 +7476,6 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument obj, 0, num_parents, parent_reqs, (H5VL_iod_req_info_t *)rc, &input, oinfo, oinfo, req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship object get_info"); - - if(loc_name) - HDfree(loc_name); break; } /* H5Oset_comment */ @@ -7449,6 +7483,40 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument { const char *comment = va_arg (arguments, char *); object_set_comment_in_t input; + hid_t trans_id; + H5TR_t *tr = NULL; + int *status = NULL; + + /* get the transaction ID */ + if(H5P_get(plist, H5VL_TRANS_ID, &trans_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id"); + /* get the TR object */ + if(NULL == (tr = (H5TR_t *)H5I_object_verify(trans_id, H5I_TR))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Transaction ID"); + + /* allocate parent request array */ + if(NULL == (parent_reqs = (H5VL_iod_request_t **) + H5MM_malloc(sizeof(H5VL_iod_request_t *) * 2))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* retrieve parent requests */ + if(H5VL_iod_get_parent_requests(obj, (H5VL_iod_req_info_t *)tr, parent_reqs, &num_parents) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to retrieve parent requests"); + + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + + /* MSC - If location object not opened yet, wait for it. */ + if(IOD_OBJ_INVALID == iod_id) { + /* Synchronously wait on the request attached to the dataset */ + if(H5VL_iod_request_wait(obj->file, obj->request) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); + obj->request = NULL; + /* retrieve IOD info of location object */ + if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, &mdkv_id, &attrkv_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to resolve current location group info"); + } if(H5VL_OBJECT_BY_SELF == loc_params.type) loc_name = strdup("."); @@ -7476,15 +7544,14 @@ H5VL_iod_object_optional(void *_obj, hid_t dxpl_id, void **req, va_list argument /* store the comment locally if the object is open */ if(loc_params.type == H5VL_OBJECT_BY_SELF) obj->comment = HDstrdup(comment); - - if(loc_name) - HDfree(loc_name); break; } default: HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from object") } done: + if(loc_name) + HDfree(loc_name); FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_object_optional() */ diff --git a/src/H5VLiod.h b/src/H5VLiod.h index ae2ef27..0950b3c 100644 --- a/src/H5VLiod.h +++ b/src/H5VLiod.h @@ -78,6 +78,8 @@ typedef enum H5FF_dset_dim_layout_t { H5D_COL_MAJOR } H5FF_dset_dim_layout_t; +extern hid_t H5VL_IOD_g; + H5_DLL hid_t H5VL_iod_init(void); H5_DLL herr_t H5Pset_fapl_iod(hid_t fapl_id, MPI_Comm comm, MPI_Info info); H5_DLL herr_t EFF_start_server(MPI_Comm comm, MPI_Info info); diff --git a/src/H5VLiod_analysis.c b/src/H5VLiod_analysis.c index 46fd560..443a63a 100644 --- a/src/H5VLiod_analysis.c +++ b/src/H5VLiod_analysis.c @@ -107,9 +107,9 @@ static herr_t H5VL__iod_read_selection(iod_handle_t coh, iod_obj_id_t obj_id, *------------------------------------------------------------------------- */ void -H5VL_iod_server_analysis_invoke_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_analysis_invoke_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1286,9 +1286,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_analysis_farm_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_analysis_farm_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1348,8 +1348,8 @@ done: */ void H5VL_iod_server_analysis_transfer_cb(AXE_engine_t axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_attr.c b/src/H5VLiod_attr.c index b431c13..12257ae 100644 --- a/src/H5VLiod_attr.c +++ b/src/H5VLiod_attr.c @@ -39,9 +39,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -277,9 +277,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -465,9 +465,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_read_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -678,9 +678,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_write_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -887,9 +887,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_exists_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1001,9 +1001,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_rename_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1144,9 +1144,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_remove_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1328,9 +1328,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_attr_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_attr_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c index 545bc6e..9b88f02 100644 --- a/src/H5VLiod_dset.c +++ b/src/H5VLiod_dset.c @@ -65,7 +65,7 @@ H5VL__iod_server_vl_data_read(iod_handle_t coh, AXE_engine_t axe_engine, AXE_tas hid_t dxpl_id, iod_trans_id_t rtid); static herr_t -H5VL__iod_server_vl_data_write_cb(void UNUSED *elem, hid_t type_id, unsigned ndims, +H5VL__iod_server_vl_data_write_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned ndims, const hsize_t *point, void *_udata); static iod_obj_id_t @@ -117,9 +117,9 @@ H5VL__iod_get_vl_blob_oid(iod_obj_id_t dset_id, hid_t space_id, const hsize_t *p *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -460,9 +460,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -607,8 +607,8 @@ done: */ void H5VL_iod_server_dset_read_cb(AXE_engine_t axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -828,9 +828,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_get_vl_size_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_get_vl_size_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1009,9 +1009,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_write_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1301,9 +1301,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_set_extent_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_set_extent_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1412,9 +1412,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1469,7 +1469,7 @@ done: herr_t H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id, size_t elmt_size, hbool_t write_op, void *buf, - size_t UNUSED buf_size, iod_checksum_t UNUSED cs, + size_t H5_ATTR_UNUSED buf_size, iod_checksum_t H5_ATTR_UNUSED cs, uint32_t cs_scope, iod_trans_id_t tid) { int ndims, i; /* dataset's rank/number of dimensions */ @@ -1694,7 +1694,7 @@ done: static herr_t H5VL__iod_server_vl_data_read(iod_handle_t coh, AXE_engine_t axe_engine, AXE_task_t axe_id, size_t nelmts, void *buf, - hid_t UNUSED dxpl_id, iod_trans_id_t rtid) + hid_t H5_ATTR_UNUSED dxpl_id, iod_trans_id_t rtid) { void *vlen_buf = NULL; uint8_t *vlen_buf_ptr; @@ -1840,10 +1840,10 @@ done: */ static herr_t H5VL__iod_server_vl_data_write(iod_handle_t coh, iod_obj_id_t iod_id, iod_handles_t iod_oh, - hid_t space_id, hid_t mem_type_id, hid_t UNUSED dset_type_id, + hid_t space_id, hid_t mem_type_id, hid_t H5_ATTR_UNUSED dset_type_id, H5VL_iod_type_info_t type_info, size_t nelmts, size_t num_segments, void **addrs, size_t *sizes, - hid_t UNUSED dxpl_id, iod_trans_id_t wtid, iod_trans_id_t rtid, + hid_t H5_ATTR_UNUSED dxpl_id, iod_trans_id_t wtid, iod_trans_id_t rtid, na_addr_t source, hg_bulk_t bulk_handle, uint32_t cs_scope, na_bool_t is_coresident) { @@ -1942,7 +1942,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5VL__iod_server_vl_data_write_cb(void UNUSED *elem, hid_t type_id, unsigned ndims, +H5VL__iod_server_vl_data_write_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned ndims, const hsize_t *point, void *_udata) { H5VL_iod_server_vl_write_t *udata = (H5VL_iod_server_vl_write_t *)_udata; diff --git a/src/H5VLiod_dtype.c b/src/H5VLiod_dtype.c index 66da6bd..c389f52 100644 --- a/src/H5VLiod_dtype.c +++ b/src/H5VLiod_dtype.c @@ -39,9 +39,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dtype_commit_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -321,9 +321,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dtype_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -514,9 +514,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dtype_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dtype_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c index 6a8c73f..6b6412d 100644 --- a/src/H5VLiod_file.c +++ b/src/H5VLiod_file.c @@ -43,9 +43,9 @@ setup_eff_container(iod_handle_t coh, uint32_t cs_scope, unsigned num_peers, hbo *------------------------------------------------------------------------- */ void -H5VL_iod_server_file_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_file_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -332,9 +332,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_file_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_file_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -677,9 +677,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_file_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_file_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_group.c b/src/H5VLiod_group.c index 420a318..efeb092 100644 --- a/src/H5VLiod_group.c +++ b/src/H5VLiod_group.c @@ -39,9 +39,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_group_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -251,9 +251,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_group_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -387,9 +387,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_group_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_group_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_index.c b/src/H5VLiod_index.c index 0e2fde1..e0a3c40 100644 --- a/src/H5VLiod_index.c +++ b/src/H5VLiod_index.c @@ -40,9 +40,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_set_index_info_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_set_index_info_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -140,9 +140,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_get_index_info_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_get_index_info_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -283,9 +283,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_dset_remove_index_info_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_dset_remove_index_info_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_link.c b/src/H5VLiod_link.c index d83007b..368cdd5 100644 --- a/src/H5VLiod_link.c +++ b/src/H5VLiod_link.c @@ -39,9 +39,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -222,9 +222,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_move_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -432,9 +432,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_exists_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_exists_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -533,9 +533,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_get_info_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_get_info_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -640,9 +640,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_get_val_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_get_val_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -748,9 +748,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_link_remove_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_map.c b/src/H5VLiod_map.c index f671f2e..6e9db90 100644 --- a/src/H5VLiod_map.c +++ b/src/H5VLiod_map.c @@ -42,9 +42,9 @@ int g_debug_counter = 0; *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -282,9 +282,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -428,9 +428,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_set_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_set_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -650,9 +650,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_get_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_get_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -928,9 +928,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_get_count_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_get_count_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1008,9 +1008,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_exists_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_exists_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1097,9 +1097,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_delete_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_delete_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1186,9 +1186,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_map_close_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_map_close_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_obj.c b/src/H5VLiod_obj.c index 79b100f..247459d 100644 --- a/src/H5VLiod_obj.c +++ b/src/H5VLiod_obj.c @@ -39,9 +39,9 @@ *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_open_by_token_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_open_by_token_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -100,9 +100,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_open_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -350,9 +350,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_copy_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -560,9 +560,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_exists_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_exists_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -630,9 +630,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_get_info_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -788,9 +788,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_set_comment_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -910,9 +910,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_get_comment_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1068,9 +1068,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_object_open_by_addr_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_object_open_by_addr_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c index aff6443..4412790 100644 --- a/src/H5VLiod_server.c +++ b/src/H5VLiod_server.c @@ -98,7 +98,7 @@ hg_id_t H5VL_EFF_ANALYSIS_FARM_TRANSFER; return ret_value; \ } herr_t -EFF_start_server(MPI_Comm comm, MPI_Info UNUSED info) +EFF_start_server(MPI_Comm comm, MPI_Info H5_ATTR_UNUSED info) { na_class_t *network_class = NULL; AXE_engine_attr_t engine_attr; @@ -400,7 +400,7 @@ done: } /* end H5VL_iod_server_eff_finalize() */ herr_t -EFF_setup_coresident(MPI_Comm comm, MPI_Info UNUSED info) +EFF_setup_coresident(MPI_Comm comm, MPI_Info H5_ATTR_UNUSED info) { AXE_engine_attr_t engine_attr; char *coresident_s = NULL; diff --git a/src/H5VLiod_trans.c b/src/H5VLiod_trans.c index ca5b590..d067fd6 100644 --- a/src/H5VLiod_trans.c +++ b/src/H5VLiod_trans.c @@ -46,9 +46,9 @@ static void check_daos_corruptions(iod_hint_list_t *chint, iod_trans_id_t trans_ *------------------------------------------------------------------------- */ void -H5VL_iod_server_rcxt_acquire_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_rcxt_acquire_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -202,9 +202,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_rcxt_release_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_rcxt_release_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -247,9 +247,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_rcxt_persist_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_rcxt_persist_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -357,9 +357,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_rcxt_snapshot_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_rcxt_snapshot_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -404,9 +404,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_trans_start_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_trans_start_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -463,9 +463,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_trans_finish_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_trans_finish_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -578,9 +578,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_trans_set_dependency_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_trans_set_dependency_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -642,9 +642,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_trans_skip_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_trans_skip_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -723,9 +723,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_trans_abort_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_trans_abort_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -775,9 +775,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_prefetch_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_prefetch_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; @@ -1003,9 +1003,9 @@ done: *------------------------------------------------------------------------- */ void -H5VL_iod_server_evict_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_evict_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5VLiod_util.c b/src/H5VLiod_util.c index 806e877..0262ccc 100644 --- a/src/H5VLiod_util.c +++ b/src/H5VLiod_util.c @@ -1156,7 +1156,7 @@ done: */ herr_t H5VL__iod_server_adjust_buffer(hid_t mem_type_id, hid_t dset_type_id, size_t nelmts, - hid_t UNUSED dxpl_id, na_bool_t is_coresident, size_t size, void **buf, + hid_t H5_ATTR_UNUSED dxpl_id, na_bool_t is_coresident, size_t size, void **buf, hbool_t *is_vl_data, size_t *_buf_size) { herr_t ret_value = SUCCEED; diff --git a/src/H5VLiod_view.c b/src/H5VLiod_view.c index 7472d24..e666229 100644 --- a/src/H5VLiod_view.c +++ b/src/H5VLiod_view.c @@ -105,9 +105,9 @@ H5VL__iod_free_view_list(H5VL_iod_view_list_t list); *------------------------------------------------------------------------- */ void -H5VL_iod_server_view_create_cb(AXE_engine_t UNUSED axe_engine, - size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], - size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], +H5VL_iod_server_view_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, + size_t H5_ATTR_UNUSED num_n_parents, AXE_task_t H5_ATTR_UNUSED n_parents[], + size_t H5_ATTR_UNUSED num_s_parents, AXE_task_t H5_ATTR_UNUSED s_parents[], void *_op_data) { op_data_t *op_data = (op_data_t *)_op_data; diff --git a/src/H5X.c b/src/H5X.c index 3caf040..15ee302 100644 --- a/src/H5X.c +++ b/src/H5X.c @@ -70,8 +70,8 @@ static size_t H5X_table_used_g = 0; static H5X_class_t *H5X_table_g = NULL; -static H5_inline hbool_t -H5X__registered(unsigned plugin_id, size_t *index) +static hbool_t +H5X__registered(unsigned plugin_id, size_t *my_index) { size_t plugin_index; hbool_t registered = FALSE; @@ -80,7 +80,7 @@ H5X__registered(unsigned plugin_id, size_t *index) for (plugin_index = 0; plugin_index < H5X_table_used_g; plugin_index++) { if (H5X_table_g[plugin_index].id == plugin_id) { registered = TRUE; - if (index) *index = plugin_index; + if (my_index) *my_index = plugin_index; break; } } @@ -512,7 +512,7 @@ done: herr_t H5Xremove(hid_t file_id, unsigned plugin_id, hid_t scope_id) { - void *file = NULL, *obj = NULL; + H5VL_object_t *file = NULL; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -521,12 +521,8 @@ H5Xremove(hid_t file_id, unsigned plugin_id, hid_t scope_id) /* Check args */ if ((plugin_id < 0) || (plugin_id > H5X_PLUGIN_MAX)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid plugin identification number"); - if (NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + if (NULL == (file = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); - if (NULL == (obj = (void *) H5VL_get_object(scope_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object/file identifier"); - if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); /* Call H5VL layer */ done: diff --git a/src/H5Xalacrity.c b/src/H5Xalacrity.c index 7603be2..b3daffd 100644 --- a/src/H5Xalacrity.c +++ b/src/H5Xalacrity.c @@ -1274,7 +1274,7 @@ done: *------------------------------------------------------------------------ */ static void * -H5X_alacrity_create(hid_t file_id, hid_t dataset_id, hid_t UNUSED xcpl_id, +H5X_alacrity_create(hid_t file_id, hid_t dataset_id, hid_t H5_ATTR_UNUSED xcpl_id, hid_t xapl_id, size_t *metadata_size, void **metadata) { H5X_alacrity_t *alacrity = NULL; @@ -1350,8 +1350,8 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_alacrity_remove(hid_t UNUSED file_id, hid_t UNUSED dataset_id, - size_t UNUSED metadata_size, void UNUSED *metadata) +H5X_alacrity_remove(hid_t H5_ATTR_UNUSED file_id, hid_t H5_ATTR_UNUSED dataset_id, + size_t H5_ATTR_UNUSED metadata_size, void H5_ATTR_UNUSED *metadata) { herr_t ret_value = SUCCEED; /* Return value */ @@ -1457,7 +1457,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_alacrity_pre_update(void *idx_handle, hid_t UNUSED dataspace_id, hid_t UNUSED xxpl_id) +H5X_alacrity_pre_update(void *idx_handle, hid_t H5_ATTR_UNUSED dataspace_id, hid_t H5_ATTR_UNUSED xxpl_id) { H5X_alacrity_t *alacrity = (H5X_alacrity_t *) idx_handle; herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Xdummy.c b/src/H5Xdummy.c index f43cc91..b70433c 100644 --- a/src/H5Xdummy.c +++ b/src/H5Xdummy.c @@ -183,7 +183,7 @@ done: *------------------------------------------------------------------------ */ static void * -H5X_dummy_create(hid_t file_id, hid_t dataset_id, hid_t UNUSED xcpl_id, +H5X_dummy_create(hid_t file_id, hid_t dataset_id, hid_t H5_ATTR_UNUSED xcpl_id, hid_t xapl_id, size_t *metadata_size, void **metadata) { H5X_dummy_t *dummy = NULL; @@ -264,8 +264,8 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_dummy_remove(hid_t UNUSED file_id, hid_t UNUSED dataset_id, size_t UNUSED metadata_size, - void UNUSED *metadata) +H5X_dummy_remove(hid_t H5_ATTR_UNUSED file_id, hid_t H5_ATTR_UNUSED dataset_id, size_t H5_ATTR_UNUSED metadata_size, + void H5_ATTR_UNUSED *metadata) { herr_t ret_value = SUCCEED; /* Return value */ @@ -375,7 +375,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_dummy_pre_update(void *idx_handle, hid_t UNUSED dataspace_id, hid_t UNUSED xxpl_id) +H5X_dummy_pre_update(void *idx_handle, hid_t H5_ATTR_UNUSED dataspace_id, hid_t H5_ATTR_UNUSED xxpl_id) { H5X_dummy_t *dummy = (H5X_dummy_t *) idx_handle; herr_t ret_value = SUCCEED; /* Return value */ @@ -443,7 +443,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X__dummy_get_query_data_cb(void *elem, hid_t type_id, unsigned UNUSED ndim, +H5X__dummy_get_query_data_cb(void *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t *point, void *_udata) { H5X__dummy_query_data_t *udata = (H5X__dummy_query_data_t *)_udata; diff --git a/src/H5Xfastbit.c b/src/H5Xfastbit.c index cb1300f..3522ac0 100644 --- a/src/H5Xfastbit.c +++ b/src/H5Xfastbit.c @@ -1078,7 +1078,7 @@ done: *------------------------------------------------------------------------ */ static void * -H5X_fastbit_create(hid_t file_id, hid_t dataset_id, hid_t UNUSED xcpl_id, +H5X_fastbit_create(hid_t file_id, hid_t dataset_id, hid_t H5_ATTR_UNUSED xcpl_id, hid_t xapl_id, size_t *metadata_size, void **metadata) { H5X_fastbit_t *fastbit = NULL; @@ -1154,8 +1154,8 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_fastbit_remove(hid_t UNUSED file_id, hid_t UNUSED dataset_id, - size_t UNUSED metadata_size, void UNUSED *metadata) +H5X_fastbit_remove(hid_t H5_ATTR_UNUSED file_id, hid_t H5_ATTR_UNUSED dataset_id, + size_t H5_ATTR_UNUSED metadata_size, void H5_ATTR_UNUSED *metadata) { herr_t ret_value = SUCCEED; /* Return value */ @@ -1261,7 +1261,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5X_fastbit_pre_update(void *idx_handle, hid_t UNUSED dataspace_id, hid_t UNUSED xxpl_id) +H5X_fastbit_pre_update(void *idx_handle, hid_t H5_ATTR_UNUSED dataspace_id, hid_t H5_ATTR_UNUSED xxpl_id) { H5X_fastbit_t *fastbit = (H5X_fastbit_t *) idx_handle; herr_t ret_value = SUCCEED; /* Return value */ -- cgit v0.12