diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-17 17:08:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-17 17:08:12 (GMT) |
commit | cbd0928d89170db56dba6c6b8c3fd7d02fe18ce6 (patch) | |
tree | 4e01bad49a84d4180baa6235972a17cbd62d5dc1 /test/cache_common.h | |
parent | 5b9b684c890bf2694b0fab26b05f1c9d87f256d1 (diff) | |
download | hdf5-cbd0928d89170db56dba6c6b8c3fd7d02fe18ce6.zip hdf5-cbd0928d89170db56dba6c6b8c3fd7d02fe18ce6.tar.gz hdf5-cbd0928d89170db56dba6c6b8c3fd7d02fe18ce6.tar.bz2 |
[svn-r16587] Description:
Add infrastructure & tests for "flush dependencies" in metadata cache,
which allow relationships that specify which order to flush metadata entries in.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'test/cache_common.h')
-rw-r--r-- | test/cache_common.h | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/test/cache_common.h b/test/cache_common.h index f76f47c..fd00db8 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -19,17 +19,23 @@ * This file contains common #defines, type definitions, and * externs for tests of the cache implemented in H5C.c */ -#include "h5test.h" -#include "H5Iprivate.h" -#include "H5ACprivate.h" +#ifndef _CACHE_COMMON_H +#define _CACHE_COMMON_H #define H5C_PACKAGE /*suppress error about including H5Cpkg */ +#define H5F_PACKAGE /*suppress error about including H5Fpkg */ +/* Include library header files */ +#include "H5ACprivate.h" #include "H5Cpkg.h" +#include "H5Fpkg.h" +#include "H5Iprivate.h" -#define H5F_PACKAGE /*suppress error about including H5Fpkg */ +/* Include test header files */ +#include "h5test.h" -#include "H5Fpkg.h" +/* Macro to make error reporting easier */ +#define CACHE_ERROR(s) {failure_mssg = "Line #" H5_TOSTRING(__LINE__) ": " s ; goto done;} #define NO_CHANGE -1 @@ -287,6 +293,13 @@ typedef struct test_entry_t hbool_t destroyed; /* entry has been destroyed since the * last time it was reset. */ + int flush_dep_par_type; /* Entry type of flush dependency parent */ + int flush_dep_par_idx; /* Index of flush dependency parent */ + uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS]; + /* flush dependency heights of flush + * dependency children + */ + unsigned flush_dep_height; /* flush dependency height of entry */ } test_entry_t; /* The following is a cut down copy of the hash table manipulation @@ -451,6 +464,13 @@ struct expected_entry_status hbool_t cleared; hbool_t flushed; hbool_t destroyed; + int flush_dep_par_type; /* Entry type of flush dependency parent */ + int flush_dep_par_idx; /* Index of flush dependency parent */ + uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS]; + /* flush dependency heights of flush + * dependency children + */ + unsigned flush_dep_height; /* flush dependency height of entry */ }; @@ -632,6 +652,10 @@ void protect_entry_ro(H5C_t * cache_ptr, int32_t type, int32_t idx); +void pin_entry(H5C_t * cache_ptr, + int32_t type, + int32_t idx); + hbool_t entry_in_cache(H5C_t * cache_ptr, int32_t type, int32_t idx); @@ -784,3 +808,17 @@ void verify_entry_status(H5C_t * cache_ptr, void verify_unprotected(void); +void create_flush_dependency(H5C_t * cache_ptr, + int32_t parent_type, + int32_t parent_idx, + int32_t child_type, + int32_t child_idx); + +void destroy_flush_dependency(H5C_t * cache_ptr, + int32_t parent_type, + int32_t parent_idx, + int32_t child_type, + int32_t child_idx); + +#endif /* _CACHE_COMMON_H */ + |