diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-02-26 18:05:27 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-02-26 18:05:27 (GMT) |
commit | f82fc6b33dfd1f752183330e61807ab94ef2c6b7 (patch) | |
tree | 0e6f60c5435c8791ca4ecbb0549f72f7c6bb184b /src/H5F.c | |
parent | ad73f18f5e759c4bd3d12c331659a24b54d0c39a (diff) | |
download | hdf5-f82fc6b33dfd1f752183330e61807ab94ef2c6b7.zip hdf5-f82fc6b33dfd1f752183330e61807ab94ef2c6b7.tar.gz hdf5-f82fc6b33dfd1f752183330e61807ab94ef2c6b7.tar.bz2 |
[svn-r299] Changes since 19980224
----------------------
./html/Files.html
Added a few details for some of the new H5Pset/get functions.
./src/H5F.c
./src/H5Fpublic.h
Fixed automatic closing of files on exit().
Added public H5F_ACC_DEBUG. Using it to create or open a file
turns on debugging for that file, which currently just prints
cache statistics when the file is closed.
./src/H5G.c
An error is returned if one tries to set the current working
group to something other than a group.
./src/H5Gnode.c
Fixed a symbol table bug. Under certain circumstances it was
possible to enter a symbol in such a way that lookup of that
symbol failed. A bug report was sent to hdf5dev.
./src/H5P.c
./src/H5Ppublic.h
Added the H5Pget_...() functions for file drivers. The
H5Pget_mpi() is a no-op that always fails.
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -130,11 +130,12 @@ H5F_init_interface(void) { herr_t ret_value = SUCCEED; + interface_initialize_g = TRUE; FUNC_ENTER(H5F_init_interface, FAIL); /* Initialize the atom group for the file IDs */ if (H5A_init_group(H5_FILE, H5A_FILEID_HASHSIZE, 0, - (herr_t (*)(void*))H5Fclose)<0 || + (herr_t (*)(void*))H5F_close)<0 || H5_add_exit(H5F_term_interface)<0) { HRETURN_ERROR (H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize interface"); @@ -151,7 +152,7 @@ H5F_init_interface(void) /* nothing more to init */ break; - case H5F_LOW_MPIO: + case H5F_LOW_MPI: #ifdef HAVE_PARALLEL H5F_access_dflt.u.mpio.access_mode = 0; H5F_access_dflt.u.mpio.comm = MPI_COMM_NULL; @@ -1064,7 +1065,7 @@ H5Fcreate(const char *filename, uintn flags, hid_t create_id, if (!filename || !*filename) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name"); } - if (flags & ~(H5F_ACC_EXCL|H5F_ACC_TRUNC)) { + if (flags & ~(H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG)) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags"); } if ((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_EXCL)) { @@ -1400,13 +1401,11 @@ H5Fclose(hid_t fid) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't unatomize file"); } - /* Close the file */ - ret_value = H5F_close(file); - - /* Remove the file atom */ - if (NULL == H5A_remove(fid)) { - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't remove atom"); - } + /* + * Decrement reference count on atom. When it reaches zero the file will + * be closed. + */ + H5A_dec_ref (fid); done: FUNC_LEAVE(ret_value < 0 ? FAIL : SUCCEED); |