diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-05-26 17:10:17 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-05-26 17:10:17 (GMT) |
commit | 7746c3a45a8c920e51ba88da7be14cc075be7f17 (patch) | |
tree | 0c8c03afdb9e9ddf6e24f722aa92f939a076523c /src | |
parent | 4d7bb37fc7a768cc4dbe2ca2da959531878f1e52 (diff) | |
download | hdf5-7746c3a45a8c920e51ba88da7be14cc075be7f17.zip hdf5-7746c3a45a8c920e51ba88da7be14cc075be7f17.tar.gz hdf5-7746c3a45a8c920e51ba88da7be14cc075be7f17.tar.bz2 |
Changed H5F_file_t to H5F_shared_t (as in develop/1.12)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fcwfs.c | 2 | ||||
-rw-r--r-- | src/H5Fefc.c | 24 | ||||
-rw-r--r-- | src/H5Ffake.c | 4 | ||||
-rw-r--r-- | src/H5Fint.c | 18 | ||||
-rw-r--r-- | src/H5Fpkg.h | 22 | ||||
-rw-r--r-- | src/H5Fprivate.h | 6 | ||||
-rw-r--r-- | src/H5Fquery.c | 2 | ||||
-rw-r--r-- | src/H5Fsfile.c | 10 | ||||
-rw-r--r-- | src/H5HGpkg.h | 4 |
9 files changed, 46 insertions, 46 deletions
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c index aa5f8ab..26452b6 100644 --- a/src/H5Fcwfs.c +++ b/src/H5Fcwfs.c @@ -299,7 +299,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_cwfs_remove_heap(H5F_file_t *shared, H5HG_heap_t *heap) +H5F_cwfs_remove_heap(H5F_shared_t *shared, H5HG_heap_t *heap) { unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Fefc.c b/src/H5Fefc.c index a394071..14aa1c5 100644 --- a/src/H5Fefc.c +++ b/src/H5Fefc.c @@ -58,14 +58,14 @@ struct H5F_efc_t { unsigned max_nfiles; /* Maximum size of the external file cache */ unsigned nrefs; /* Number of times this file appears in another file's EFC */ int tag; /* Temporary variable used by H5F__efc_try_close() */ - H5F_file_t *tmp_next; /* Next file in temporary list used by H5F__efc_try_close() */ + H5F_shared_t *tmp_next; /* Next file in temporary list used by H5F__efc_try_close() */ }; /* Private prototypes */ static herr_t H5F__efc_release_real(H5F_efc_t *efc); static herr_t H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent); -static void H5F__efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail); -static void H5F__efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail); +static void H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail); +static void H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail); /* Free lists */ H5FL_DEFINE_STATIC(H5F_efc_ent_t); @@ -628,10 +628,10 @@ done: *------------------------------------------------------------------------- */ static void -H5F__efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail) +H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail) { H5F_efc_ent_t *ent = NULL; /* EFC entry */ - H5F_file_t *esf; /* Convenience pointer to ent->file->shared */ + H5F_shared_t *esf; /* Convenience pointer to ent->file->shared */ FUNC_ENTER_STATIC_NOERR @@ -702,10 +702,10 @@ H5F__efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail) *------------------------------------------------------------------------- */ static void -H5F__efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail) +H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail) { H5F_efc_ent_t *ent = NULL; /* EFC entry */ - H5F_file_t *esf; /* Convenience pointer to ent->file->shared */ + H5F_shared_t *esf; /* Convenience pointer to ent->file->shared */ FUNC_ENTER_STATIC_NOERR @@ -811,11 +811,11 @@ H5F__efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail) herr_t H5F__efc_try_close(H5F_t *f) { - H5F_file_t *tail; /* Tail of linked list of found files. Head will be f->shared. */ - H5F_file_t *uncloseable_head = NULL; /* Head of linked list of files found to be uncloseable by the first pass */ - H5F_file_t *uncloseable_tail = NULL; /* Tail of linked list of files found to be uncloseable by the first pass */ - H5F_file_t *sf; /* Temporary file pointer */ - H5F_file_t *next; /* Temporary file pointer */ + H5F_shared_t *tail; /* Tail of linked list of found files. Head will be f->shared. */ + H5F_shared_t *uncloseable_head = NULL; /* Head of linked list of files found to be uncloseable by the first pass */ + H5F_shared_t *uncloseable_tail = NULL; /* Tail of linked list of files found to be uncloseable by the first pass */ + H5F_shared_t *sf; /* Temporary file pointer */ + H5F_shared_t *next; /* Temporary file pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 7e44cfc..7476a92 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -52,7 +52,7 @@ H5F_fake_alloc(uint8_t sizeof_size) /* Allocate faked file struct */ if(NULL == (f = H5FL_CALLOC(H5F_t))) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure") - if(NULL == (f->shared = H5FL_CALLOC(H5F_file_t))) + if(NULL == (f->shared = H5FL_CALLOC(H5F_shared_t))) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure") /* Only set fields necessary for clients */ @@ -94,7 +94,7 @@ H5F_fake_free(H5F_t *f) if(f) { /* Destroy shared file struct */ if(f->shared) - f->shared = H5FL_FREE(H5F_file_t, f->shared); + f->shared = H5FL_FREE(H5F_shared_t, f->shared); f = H5FL_FREE(H5F_t, f); } /* end if */ diff --git a/src/H5Fint.c b/src/H5Fint.c index f1afffe..671a8e4 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -55,7 +55,7 @@ typedef struct H5F_olist_t { struct { hbool_t local; /* Set flag for "local" file searches */ union { - H5F_file_t *shared; /* Pointer to shared file to look inside */ + H5F_shared_t *shared; /* Pointer to shared file to look inside */ const H5F_t *file; /* Pointer to file to look inside */ } ptr; } file_info; @@ -98,8 +98,8 @@ static herr_t H5F__flush_phase2(H5F_t *f, hbool_t closing); /* Declare a free list to manage the H5F_t struct */ H5FL_DEFINE(H5F_t); -/* Declare a free list to manage the H5F_file_t struct */ -H5FL_DEFINE(H5F_file_t); +/* Declare a free list to manage the H5F_shared_t struct */ +H5FL_DEFINE(H5F_shared_t); @@ -857,7 +857,7 @@ done: *------------------------------------------------------------------------- */ H5F_t * -H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf) +H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf) { H5F_t *f = NULL; H5F_t *ret_value = NULL; @@ -878,7 +878,7 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_ size_t u; /* Local index variable */ HDassert(lf != NULL); - if(NULL == (f->shared = H5FL_CALLOC(H5F_file_t))) + if(NULL == (f->shared = H5FL_CALLOC(H5F_shared_t))) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure") f->shared->flags = flags; @@ -1093,7 +1093,7 @@ done: if(H5I_dec_ref(f->shared->fcpl_id) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list") - f->shared = H5FL_FREE(H5F_file_t, f->shared); + f->shared = H5FL_FREE(H5F_shared_t, f->shared); } f = H5FL_FREE(H5F_t, f); } @@ -1332,7 +1332,7 @@ H5F__dest(H5F_t *f, hbool_t flush) f->shared->retries[actype] = (uint32_t *)H5MM_xfree(f->shared->retries[actype]); /* Destroy shared file struct */ - f->shared = (H5F_file_t *)H5FL_FREE(H5F_file_t, f->shared); + f->shared = (H5F_shared_t *)H5FL_FREE(H5F_shared_t, f->shared); } else if(f->shared->nrefs > 0) { @@ -1433,7 +1433,7 @@ H5F_t * H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { H5F_t *file = NULL; /*the success return value */ - H5F_file_t *shared = NULL; /*shared part of `file' */ + H5F_shared_t *shared = NULL; /*shared part of `file' */ H5FD_t *lf = NULL; /*file driver part of `shared' */ unsigned tent_flags; /*tentative flags */ H5FD_class_t *drvr; /*file driver class info */ @@ -2174,7 +2174,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) /* * Destroy the H5F_t struct and decrement the reference count for the - * shared H5F_file_t struct. If the reference count for the H5F_file_t + * shared H5F_shared_t struct. If the reference count for the H5F_shared_t * struct reaches zero then destroy it also. */ if(H5F__dest(f, TRUE) < 0) diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index fd9e00e..f9d3f53 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -214,7 +214,7 @@ typedef struct H5F_mtab_t { } H5F_mtab_t; /* Structure specifically to store superblock. This was originally - * maintained entirely within H5F_file_t, but is now extracted + * maintained entirely within H5F_shared_t, but is now extracted * here because the superblock is now handled by the cache */ typedef struct H5F_super_t { H5AC_info_t cache_info; /* Cache entry information structure */ @@ -235,11 +235,11 @@ typedef struct H5F_super_t { /* * Define the structure to store the file information for HDF5 files. One of * these structures is allocated per file, not per H5Fopen(). That is, set of - * H5F_t structs can all point to the same H5F_file_t struct. The `nrefs' + * H5F_t structs can all point to the same H5F_shared_t struct. The `nrefs' * count in this struct indicates the number of H5F_t structs which are * pointing to this struct. */ -struct H5F_file_t { +struct H5F_shared_t { H5FD_t *lf; /* Lower level file handle for I/O */ H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */ H5O_drvinfo_t *drvinfo; /* Pointer to the (pinned) driver info @@ -360,13 +360,13 @@ struct H5F_file_t { /* * This is the top-level file descriptor. One of these structures is * allocated every time H5Fopen() is called although they may contain pointers - * to shared H5F_file_t structs. + * to shared H5F_shared_t structs. */ struct H5F_t { char *open_name; /* Name used to open file */ char *actual_name; /* Actual name of the file, after resolving symlinks, etc. */ char *extpath; /* Path for searching target external link file */ - H5F_file_t *shared; /* The shared file info */ + H5F_shared_t *shared; /* The shared file info */ unsigned nopen_objs; /* Number of open object headers */ H5FO_t *obj_count; /* # of time each object is opened through top file structure */ hid_t file_id; /* ID of this file */ @@ -386,8 +386,8 @@ struct H5F_t { /* Declare a free list to manage the H5F_t struct */ H5FL_EXTERN(H5F_t); -/* Declare a free list to manage the H5F_file_t struct */ -H5FL_EXTERN(H5F_file_t); +/* Declare a free list to manage the H5F_shared_t struct */ +H5FL_EXTERN(H5F_shared_t); /******************************/ @@ -395,7 +395,7 @@ H5FL_EXTERN(H5F_file_t); /******************************/ /* General routines */ -H5_DLL H5F_t *H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf); +H5_DLL H5F_t *H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf); H5_DLL herr_t H5F__dest(H5F_t *f, hbool_t flush); H5_DLL herr_t H5F__flush(H5F_t *f); H5_DLL htri_t H5F__is_hdf5(const char *name); @@ -435,9 +435,9 @@ H5_DLL herr_t H5F__accum_flush(H5F_t *f); H5_DLL herr_t H5F__accum_reset(H5F_t *f, hbool_t flush); /* Shared file list related routines */ -H5_DLL herr_t H5F_sfile_add(H5F_file_t *shared); -H5_DLL H5F_file_t * H5F_sfile_search(H5FD_t *lf); -H5_DLL herr_t H5F_sfile_remove(H5F_file_t *shared); +H5_DLL herr_t H5F_sfile_add(H5F_shared_t *shared); +H5_DLL H5F_shared_t * H5F_sfile_search(H5FD_t *lf); +H5_DLL herr_t H5F_sfile_remove(H5F_shared_t *shared); /* External file cache routines */ H5_DLL H5F_efc_t *H5F__efc_create(unsigned max_nfiles); diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 9acddfd..17317b9 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -653,7 +653,7 @@ struct H5P_genplist_t; /* Forward declarations for anonymous H5F objects */ /* Main file structures */ -typedef struct H5F_file_t H5F_file_t; +typedef struct H5F_shared_t H5F_shared_t; /* Block aggregation structure */ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t; @@ -729,7 +729,7 @@ H5_DLL unsigned H5F_get_intent(const H5F_t *f); H5_DLL char *H5F_get_open_name(const H5F_t *f); H5_DLL char *H5F_get_actual_name(const H5F_t *f); H5_DLL char *H5F_get_extpath(const H5F_t *f); -H5_DLL H5F_file_t *H5F_get_shared(const H5F_t *f); +H5_DLL H5F_shared_t *H5F_get_shared(const H5F_t *f); H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2); H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f); H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f); @@ -856,7 +856,7 @@ H5_DLL H5F_t *H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap); H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr); H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap, hbool_t add_heap); -H5_DLL herr_t H5F_cwfs_remove_heap(H5F_file_t *shared, struct H5HG_heap_t *heap); +H5_DLL herr_t H5F_cwfs_remove_heap(H5F_shared_t *shared, struct H5HG_heap_t *heap); /* Debugging functions */ H5_DLL herr_t H5F_debug(H5F_t *f, FILE * stream, int indent, int fwidth); diff --git a/src/H5Fquery.c b/src/H5Fquery.c index e02e402..3f526be 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -221,7 +221,7 @@ H5F_get_extpath(const H5F_t *f) * Return: 'shared' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ -H5F_file_t * +H5F_shared_t * H5F_get_shared(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c index a066790..6ca338f 100644 --- a/src/H5Fsfile.c +++ b/src/H5Fsfile.c @@ -24,7 +24,7 @@ /* Struct for tracking "shared" file structs */ typedef struct H5F_sfile_node_t { - H5F_file_t *shared; /* Pointer to "shared" file struct */ + H5F_shared_t *shared; /* Pointer to "shared" file struct */ struct H5F_sfile_node_t *next; /* Pointer to next node */ } H5F_sfile_node_t; @@ -96,7 +96,7 @@ H5F_sfile_assert_num(unsigned n) *------------------------------------------------------------------------- */ herr_t -H5F_sfile_add(H5F_file_t *shared) +H5F_sfile_add(H5F_shared_t *shared) { H5F_sfile_node_t *new_shared; /* New shared file node */ herr_t ret_value = SUCCEED; /* Return value */ @@ -135,11 +135,11 @@ done: * *------------------------------------------------------------------------- */ -H5F_file_t * +H5F_shared_t * H5F_sfile_search(H5FD_t *lf) { H5F_sfile_node_t *curr; /* Current shared file node */ - H5F_file_t *ret_value = NULL; /* Return value */ + H5F_shared_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -175,7 +175,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_sfile_remove(H5F_file_t *shared) +H5F_sfile_remove(H5F_shared_t *shared) { H5F_sfile_node_t *curr; /* Current shared file node */ H5F_sfile_node_t *last; /* Last shared file node */ diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index a735ba0..53cf864 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -117,7 +117,7 @@ typedef struct H5HG_obj_t { } H5HG_obj_t; /* Forward declarations for fields */ -struct H5F_file_t; +struct H5F_shared_t; struct H5HG_heap_t { H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */ @@ -130,7 +130,7 @@ struct H5HG_heap_t { /* If this value is >65535 then all indices */ /* have been used at some time and the */ /* correct new index should be searched for */ - struct H5F_file_t *shared; /* shared file */ + struct H5F_shared_t *shared; /* shared file */ H5HG_obj_t *obj; /*array of object descriptions */ }; |