diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-03-31 20:39:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-03-31 20:39:18 (GMT) |
commit | f4e7559bd2d8bbd59535cbcafab78e162a6bffb6 (patch) | |
tree | b4339300a7d08fe64266ad183213da8a38fb986e /src | |
parent | 9c0a2b214519c6f0508964981be19bf2e3054e35 (diff) | |
download | hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.zip hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.tar.gz hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.tar.bz2 |
[svn-r20383] Description:
Bring r19714:20382 from trunk to revise_chunks branch
Tested:
Linux 2.6/64 (chicago)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5F.c | 10 | ||||
-rw-r--r-- | src/H5Fmount.c | 2 | ||||
-rw-r--r-- | src/H5Fpkg.h | 2 | ||||
-rw-r--r-- | src/H5Gloc.c | 2 | ||||
-rw-r--r-- | src/H5O.c | 4 | ||||
-rw-r--r-- | src/H5public.h | 11 | ||||
-rw-r--r-- | src/H5system.c | 4 | ||||
-rw-r--r-- | src/H5win32defs.h | 4 |
8 files changed, 25 insertions, 14 deletions
@@ -1006,7 +1006,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) * the caller requested a flush. */ if((f->shared->flags & H5F_ACC_RDWR) && flush) - if(H5F_flush(f, dxpl_id) < 0) + if(H5F_flush(f, dxpl_id, TRUE) < 0) HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") /* Release the external file cache */ @@ -1670,7 +1670,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) } /* end if */ else { /* Call the flush routine, for this file */ - if(H5F_flush(f, H5AC_dxpl_id) < 0) + if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") } /* end else */ } /* end if */ @@ -1694,7 +1694,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_flush(H5F_t *f, hid_t dxpl_id) +H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing) { herr_t ret_value = SUCCEED; /* Return value */ @@ -1729,7 +1729,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id) HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator") /* Flush file buffers to disk. */ - if(H5FD_flush(f->shared->lf, dxpl_id, FALSE) < 0) + if(H5FD_flush(f->shared->lf, dxpl_id, closing) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed") @@ -2003,7 +2003,7 @@ H5Fclose(hid_t file_id) if((nref = H5I_get_ref(file_id, FALSE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID ref count") if(nref == 1) - if(H5F_flush(f, H5AC_dxpl_id) < 0) + if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") } /* end if */ diff --git a/src/H5Fmount.c b/src/H5Fmount.c index 40be54c..d04e747 100644 --- a/src/H5Fmount.c +++ b/src/H5Fmount.c @@ -659,7 +659,7 @@ H5F_flush_mounts_recurse(H5F_t *f, hid_t dxpl_id) nerrors++; /* Call the "real" flush routine, for this file */ - if(H5F_flush(f, dxpl_id) < 0) + if(H5F_flush(f, dxpl_id, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") /* Check flush errors for children - errors are already on the stack */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 74c9aa5..0768d08 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -297,7 +297,7 @@ H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1]; /* General routines */ H5_DLL herr_t H5F_init(void); H5_DLL haddr_t H5F_locate_signature(H5FD_t *file, hid_t dxpl_id); -H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id); +H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing); /* File mount related routines */ H5_DLL herr_t H5F_close_mounts(H5F_t *f); diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 82b7575..cfa4f44 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -947,7 +947,7 @@ done: * Purpose: Retrieve the information for an object from a group location * and path to that object * - * Return: Success: Number of bytes in the comment including the + * Return: Success: Number of bytes in the comment excluding the * null terminator. Zero if the object has no * comment. * @@ -823,7 +823,7 @@ done: * * Purpose: Retrieve comment for an object. * - * Return: Success: Number of bytes in the comment including the + * Return: Success: Number of bytes in the comment excluding the * null terminator. Zero if the object has no * comment. * @@ -861,7 +861,7 @@ done: * * Purpose: Retrieve comment for an object. * - * Return: Success: Number of bytes in the comment including the + * Return: Success: Number of bytes in the comment excluding the * null terminator. Zero if the object has no * comment. * diff --git a/src/H5public.h b/src/H5public.h index 47fe27b..76ce8d5 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -83,6 +83,17 @@ extern "C" { #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) +/* macros for comparing the version */ +#define H5_VERSION_GE(Maj,Min,Rel) \ + (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \ + ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \ + (H5_VERS_MAJOR>Maj)) + +#define H5_VERSION_LE(Maj,Min,Rel) \ + (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE<=Rel)) || \ + ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR<Min)) || \ + (H5_VERS_MAJOR<Maj)) + /* * Status return values. Failed integer functions in HDF5 result almost * always in a negative value (unsigned failing functions sometimes return diff --git a/src/H5system.c b/src/H5system.c index 7776cbb..02ea625 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -584,7 +584,7 @@ HDremove_all(const char *fname) #endif /*------------------------------------------------------------------------- - * Function: HDgettimeofday + * Function: Wgettimeofday * * Purpose: Wrapper function for gettimeofday on Windows systems * @@ -610,7 +610,7 @@ HDremove_all(const char *fname) #define _W32_FT_OFFSET (116444736000000000ULL) int -HDgettimeofday(struct timeval *tv, void *tz) +Wgettimeofday(struct timeval *tv, void *tz) { union { unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */ diff --git a/src/H5win32defs.h b/src/H5win32defs.h index fb37059..6ccc86a 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -48,11 +48,11 @@ typedef __int64 h5_stat_size_t; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - H5_DLL int HDgettimeofday(struct timeval *tv, void *tz); + H5_DLL int Wgettimeofday(struct timeval *tv, void *tz); #ifdef __cplusplus } #endif /* __cplusplus */ - #define HDgettimeofday(V,Z) HDgettimeofday(V,Z) + #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) #endif /* H5_HAVE_GETTIMEOFDAY */ #define HDgetdrive() _getdrive() #define HDlseek(F,O,W) _lseeki64(F,O,W) |