summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:21:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:21:08 (GMT)
commit1bc07c6aaeadd03d73216af25db0cb46db2391e0 (patch)
tree79cfb25eaad5e610b1c10f9a21b27ec9c07685b0 /src/H5F.c
parentdf2fef9759940bf5d80e8aa5a8dcd1251d58d490 (diff)
parent77038a81755bd6c853323ba261c9c671800d7be7 (diff)
downloadhdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.zip
hdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.tar.gz
hdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.tar.bz2
[svn-r18031] Description:
Bring r18030 from merge_metadata_journaling branch to trunk: Bring "brush clearing" changes (whitespace & style issues, mostly) from metadata_journaling branch to the "merging" branch, to converge the trunk and the metadata_journaling branch. Also, some other minor cleanups along the way. 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/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production 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 debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c105
1 files changed, 19 insertions, 86 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 4a20825..0f63a59 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2514,21 +2514,13 @@ done:
* Programmer: John Mainzer
* 3/24/05
*
- * Modifications:
- *
- * Reworked for the addition of the config_ptr parameter.
- * JRM -- 4/7/05
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5Fget_mdc_config(hid_t file_id,
- H5AC_cache_config_t *config_ptr)
+H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
{
H5F_t *file; /* File object for file ID */
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Fget_mdc_config, FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
@@ -2540,18 +2532,11 @@ H5Fget_mdc_config(hid_t file_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config_ptr")
/* Go get the resize configuration */
- result = H5AC_get_cache_auto_resize_config(file->shared->cache, config_ptr);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_get_cache_auto_resize_config() failed.");
- }
+ if(H5AC_get_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_auto_resize_config() failed.")
done:
-
FUNC_LEAVE_API(ret_value)
-
} /* H5Fget_mdc_config() */
@@ -2568,20 +2553,13 @@ done:
* Programmer: John Mainzer
* 3/24/05
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5Fset_mdc_config(hid_t file_id,
- H5AC_cache_config_t *config_ptr)
+H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
{
H5F_t *file; /* File object for file ID */
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Fset_mdc_config, FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
@@ -2591,18 +2569,11 @@ H5Fset_mdc_config(hid_t file_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* set the resize configuration */
- result = H5AC_set_cache_auto_resize_config(file->shared->cache, config_ptr);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "H5AC_set_cache_auto_resize_config() failed.");
- }
+ if(H5AC_set_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC_set_cache_auto_resize_config() failed.")
done:
-
FUNC_LEAVE_API(ret_value)
-
} /* H5Fset_mdc_config() */
@@ -2620,20 +2591,13 @@ done:
* Programmer: John Mainzer
* 3/24/05
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5Fget_mdc_hit_rate(hid_t file_id,
- double *hit_rate_ptr)
+H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
{
H5F_t *file; /* File object for file ID */
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Fget_mdc_hit_rate, FAIL)
H5TRACE2("e", "i*d", file_id, hit_rate_ptr);
@@ -2646,18 +2610,11 @@ H5Fget_mdc_hit_rate(hid_t file_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL hit rate pointer")
/* Go get the current hit rate */
- result = H5AC_get_cache_hit_rate(file->shared->cache, hit_rate_ptr);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_get_cache_hit_rate() failed.");
- }
+ if(H5AC_get_cache_hit_rate(file->shared->cache, hit_rate_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_hit_rate() failed.")
done:
-
FUNC_LEAVE_API(ret_value)
-
} /* H5Fget_mdc_hit_rate() */
@@ -2676,24 +2633,15 @@ done:
* Programmer: John Mainzer
* 3/24/05
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5Fget_mdc_size(hid_t file_id,
- size_t *max_size_ptr,
- size_t *min_clean_size_ptr,
- size_t *cur_size_ptr,
- int *cur_num_entries_ptr)
+H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
+ size_t *cur_size_ptr, int *cur_num_entries_ptr)
{
H5F_t *file; /* File object for file ID */
int32_t cur_num_entries;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Fget_mdc_size, FAIL)
H5TRACE5("e", "i*z*z*z*Is", file_id, max_size_ptr, min_clean_size_ptr,
@@ -2704,26 +2652,15 @@ H5Fget_mdc_size(hid_t file_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Go get the size data */
- result = H5AC_get_cache_size(file->shared->cache,
- max_size_ptr,
- min_clean_size_ptr,
- cur_size_ptr,
- &cur_num_entries);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_get_cache_size() failed.");
-
- } else if ( cur_num_entries_ptr != NULL ) {
+ if(H5AC_get_cache_size(file->shared->cache, max_size_ptr,
+ min_clean_size_ptr, cur_size_ptr, &cur_num_entries) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_size() failed.")
+ if(cur_num_entries_ptr != NULL)
*cur_num_entries_ptr = (int)cur_num_entries;
- }
done:
-
FUNC_LEAVE_API(ret_value)
-
} /* H5Fget_mdc_size() */
@@ -2745,10 +2682,6 @@ done:
* Programmer: John Mainzer
* 3/24/05
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
herr_t