diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 16:29:52 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 16:29:52 (GMT) |
commit | ca8465513df4d24bb4d941c00b2b90d4f592c28e (patch) | |
tree | aa7d2904bedb46c371b37cab7711e78918133056 /test/cache_common.h | |
parent | 5e94747c52e7ecffdec9262a98caeb5deb5970b2 (diff) | |
download | hdf5-ca8465513df4d24bb4d941c00b2b90d4f592c28e.zip hdf5-ca8465513df4d24bb4d941c00b2b90d4f592c28e.tar.gz hdf5-ca8465513df4d24bb4d941c00b2b90d4f592c28e.tar.bz2 |
[svn-r29882] Convert cache source files to library compatible by CMake and Windows
Diffstat (limited to 'test/cache_common.h')
-rw-r--r-- | test/cache_common.h | 123 |
1 files changed, 67 insertions, 56 deletions
diff --git a/test/cache_common.h b/test/cache_common.h index c07ab25..655e17e 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -532,27 +532,34 @@ struct expected_entry_status /* global variable externs: */ +H5TEST_DLLVAR H5C_t * saved_cache; -extern haddr_t saved_actual_base_addr; -extern hbool_t write_permitted; -extern hbool_t pass; /* set to false on error */ -extern const char *failure_mssg; +H5TEST_DLLVAR const char *FILENAME[]; -extern test_entry_t * entries[NUMBER_OF_ENTRY_TYPES]; -extern const int32_t max_indices[NUMBER_OF_ENTRY_TYPES]; -extern const size_t entry_sizes[NUMBER_OF_ENTRY_TYPES]; -extern const haddr_t base_addrs[NUMBER_OF_ENTRY_TYPES]; -extern const haddr_t alt_base_addrs[NUMBER_OF_ENTRY_TYPES]; -extern const char * entry_type_names[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR haddr_t saved_actual_base_addr; +H5TEST_DLLVAR hbool_t write_permitted; +H5TEST_DLLVAR hbool_t pass; /* set to false on error */ +H5TEST_DLLVAR const char *failure_mssg; + +H5TEST_DLLVAR test_entry_t * entries[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const int32_t max_indices[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const size_t entry_sizes[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const haddr_t base_addrs[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const haddr_t alt_base_addrs[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const char * entry_type_names[NUMBER_OF_ENTRY_TYPES]; /* callback table extern */ -extern const H5C_class_t types[NUMBER_OF_ENTRY_TYPES]; +H5TEST_DLLVAR const H5C_class_t types[NUMBER_OF_ENTRY_TYPES]; +#ifdef __cplusplus +extern "C" { +#endif + /* function declarations: */ -void add_flush_op(int target_type, +H5TEST_DLL void add_flush_op(int target_type, int target_idx, int op_code, int type, @@ -562,69 +569,69 @@ void add_flush_op(int target_type, unsigned * order); -void addr_to_type_and_index(haddr_t addr, +H5TEST_DLL void addr_to_type_and_index(haddr_t addr, int32_t * type_ptr, int32_t * index_ptr); #if 0 /* keep this for a while -- it may be useful */ -haddr_t type_and_index_to_addr(int32_t type, +H5TEST_DLL haddr_t type_and_index_to_addr(int32_t type, int32_t idx); #endif -void dirty_entry(H5F_t * file_ptr, +H5TEST_DLL void dirty_entry(H5F_t * file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin); -void expunge_entry(H5F_t * file_ptr, +H5TEST_DLL void expunge_entry(H5F_t * file_ptr, int32_t type, int32_t idx); -void insert_entry(H5F_t * file_ptr, +H5TEST_DLL void insert_entry(H5F_t * file_ptr, int32_t type, int32_t idx, unsigned int flags); -void mark_entry_dirty(int32_t type, - int32_t idx); +H5TEST_DLL void mark_entry_dirty(int32_t type, + int32_t idx); -void move_entry(H5C_t * cache_ptr, +H5TEST_DLL void move_entry(H5C_t * cache_ptr, int32_t type, int32_t idx, hbool_t main_addr); -void protect_entry(H5F_t * file_ptr, +H5TEST_DLL void protect_entry(H5F_t * file_ptr, int32_t type, int32_t idx); -void protect_entry_ro(H5F_t * file_ptr, +H5TEST_DLL void protect_entry_ro(H5F_t * file_ptr, int32_t type, int32_t idx); -void pin_entry(int32_t type, +H5TEST_DLL void pin_entry(int32_t type, int32_t idx); -hbool_t entry_in_cache(H5C_t * cache_ptr, +H5TEST_DLL hbool_t entry_in_cache(H5C_t * cache_ptr, int32_t type, int32_t idx); -void create_pinned_entry_dependency(H5F_t * file_ptr, - int pinning_type, - int pinning_idx, - int pinned_type, - int pinned_idx); +H5TEST_DLL void create_pinned_entry_dependency(H5F_t * file_ptr, + int pinning_type, + int pinning_idx, + int pinned_type, + int pinned_idx); -void reset_entries(void); +H5TEST_DLL void reset_entries(void); -void resize_entry(H5F_t * file_ptr, +H5TEST_DLL void resize_entry(H5F_t * file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_t in_cache); -H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size); +H5TEST_DLL H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size); -void row_major_scan_forward(H5F_t * file_ptr, +H5TEST_DLL void row_major_scan_forward(H5F_t * file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, @@ -639,7 +646,7 @@ void row_major_scan_forward(H5F_t * file_ptr, int dirty_destroys, int dirty_unprotects); -void hl_row_major_scan_forward(H5F_t * file_ptr, +H5TEST_DLL void hl_row_major_scan_forward(H5F_t * file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats, @@ -647,7 +654,7 @@ void hl_row_major_scan_forward(H5F_t * file_ptr, hbool_t display_detailed_stats, hbool_t do_inserts); -void row_major_scan_backward(H5F_t * file_ptr, +H5TEST_DLL void row_major_scan_backward(H5F_t * file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, @@ -662,7 +669,7 @@ void row_major_scan_backward(H5F_t * file_ptr, int dirty_destroys, int dirty_unprotects); -void hl_row_major_scan_backward(H5F_t * file_ptr, +H5TEST_DLL void hl_row_major_scan_backward(H5F_t * file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats, @@ -670,7 +677,7 @@ void hl_row_major_scan_backward(H5F_t * file_ptr, hbool_t display_detailed_stats, hbool_t do_inserts); -void col_major_scan_forward(H5F_t * file_ptr, +H5TEST_DLL void col_major_scan_forward(H5F_t * file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, @@ -680,7 +687,7 @@ void col_major_scan_forward(H5F_t * file_ptr, hbool_t do_inserts, int dirty_unprotects); -void hl_col_major_scan_forward(H5F_t * file_ptr, +H5TEST_DLL void hl_col_major_scan_forward(H5F_t * file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats, @@ -689,7 +696,7 @@ void hl_col_major_scan_forward(H5F_t * file_ptr, hbool_t do_inserts, int dirty_unprotects); -void col_major_scan_backward(H5F_t * file_ptr, +H5TEST_DLL void col_major_scan_backward(H5F_t * file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, @@ -699,7 +706,7 @@ void col_major_scan_backward(H5F_t * file_ptr, hbool_t do_inserts, int dirty_unprotects); -void hl_col_major_scan_backward(H5F_t * file_ptr, +H5TEST_DLL void hl_col_major_scan_backward(H5F_t * file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats, @@ -708,69 +715,73 @@ void hl_col_major_scan_backward(H5F_t * file_ptr, hbool_t do_inserts, int dirty_unprotects); -void takedown_cache(H5F_t * file_ptr, +H5TEST_DLL void takedown_cache(H5F_t * file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats); -void flush_cache(H5F_t * file_ptr, +H5TEST_DLL void flush_cache(H5F_t * file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_t dump_detailed_stats); -void unpin_entry(int32_t type, +H5TEST_DLL void unpin_entry(int32_t type, int32_t idx); -void unprotect_entry(H5F_t * file_ptr, +H5TEST_DLL void unprotect_entry(H5F_t * file_ptr, int32_t type, int32_t idx, unsigned int flags); -void verify_clean(void); +H5TEST_DLL void verify_clean(void); -void verify_entry_status(H5C_t * cache_ptr, - int tag, +H5TEST_DLL void verify_entry_status(H5C_t * cache_ptr, + int tag, int num_entries, struct expected_entry_status expected[]); -void verify_unprotected(void); +H5TEST_DLL void verify_unprotected(void); -void create_flush_dependency(int32_t parent_type, +H5TEST_DLL void create_flush_dependency(int32_t parent_type, int32_t parent_idx, int32_t child_type, int32_t child_idx); -void destroy_flush_dependency(int32_t parent_type, +H5TEST_DLL void destroy_flush_dependency(int32_t parent_type, int32_t parent_idx, int32_t child_type, int32_t child_idx); /*** H5AC level utility functions ***/ -hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, +H5TEST_DLL hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b, hbool_t compare_init); -void check_and_validate_cache_hit_rate(hid_t file_id, +H5TEST_DLL void check_and_validate_cache_hit_rate(hid_t file_id, double * hit_rate_ptr, hbool_t dump_data, int64_t min_accesses, double min_hit_rate); -void check_and_validate_cache_size(hid_t file_id, +H5TEST_DLL void check_and_validate_cache_size(hid_t file_id, size_t * max_size_ptr, size_t * min_clean_size_ptr, size_t * cur_size_ptr, int32_t * cur_num_entries_ptr, hbool_t dump_data); -void validate_mdc_config(hid_t file_id, +H5TEST_DLL void validate_mdc_config(hid_t file_id, H5AC_cache_config_t * ext_config_ptr, hbool_t compare_init, int test_num); /** Debugging functions -- normally commented out ***/ #if 0 -void dump_LRU(H5F_t * file_ptr); -#endif +H5TEST_DLL void dump_LRU(H5F_t * file_ptr); +#endif + +#ifdef __cplusplus +} +#endif #endif /* _CACHE_COMMON_H */ |