diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-17 20:59:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-17 20:59:36 (GMT) |
commit | 34ada2e41da08bede1962abf5415f41d795c5ee6 (patch) | |
tree | 523dd0c825a79ae37d89021a1a720ca5fc69b303 /src/H5Dselect.c | |
parent | e12e4936e929ae0dcb1d65acf6bedb422acca01a (diff) | |
download | hdf5-34ada2e41da08bede1962abf5415f41d795c5ee6.zip hdf5-34ada2e41da08bede1962abf5415f41d795c5ee6.tar.gz hdf5-34ada2e41da08bede1962abf5415f41d795c5ee6.tar.bz2 |
[svn-r22291] Description:
Bring r22287 from trunk to 1.8 branch:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward
the final design (as exemplified by the H5EA & H5FA code).
Tested on:
Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5Dselect.c')
-rw-r--r-- | src/H5Dselect.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/H5Dselect.c b/src/H5Dselect.c index d75b7ed..38f8bc4 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -49,6 +49,9 @@ /* Local Prototypes */ /********************/ +static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, + size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space); + /*********************/ /* Package Variables */ @@ -68,7 +71,7 @@ H5FL_SEQ_DEFINE(hsize_t); /*------------------------------------------------------------------------- - * Function: H5D_select_io + * Function: H5D__select_io * * Purpose: Perform I/O directly from application memory and a file * @@ -80,7 +83,7 @@ H5FL_SEQ_DEFINE(hsize_t); *------------------------------------------------------------------------- */ static herr_t -H5D_select_io(const H5D_io_info_t *io_info, size_t elmt_size, +H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space) { H5S_sel_iter_t mem_iter; /* Memory selection iteration info */ @@ -102,7 +105,7 @@ H5D_select_io(const H5D_io_info_t *io_info, size_t elmt_size, ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Check args */ HDassert(io_info); @@ -245,11 +248,11 @@ done: mem_off = H5FL_SEQ_FREE(hsize_t, mem_off); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_select_io() */ +} /* end H5D__select_io() */ /*------------------------------------------------------------------------- - * Function: H5D_select_read + * Function: H5D__select_read * * Purpose: Reads directly from file into application memory. * @@ -261,26 +264,26 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, +H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Call generic selection operation */ H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t); - if(H5D_select_io(io_info, type_info->src_type_size, (size_t)nelmts, + if(H5D__select_io(io_info, type_info->src_type_size, (size_t)nelmts, file_space, mem_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_select_read() */ +} /* end H5D__select_read() */ /*------------------------------------------------------------------------- - * Function: H5D_select_write + * Function: H5D__select_write * * Purpose: Writes directly from application memory into a file * @@ -292,20 +295,20 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, +H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* Call generic selection operation */ H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t); - if(H5D_select_io(io_info, type_info->dst_type_size, (size_t)nelmts, + if(H5D__select_io(io_info, type_info->dst_type_size, (size_t)nelmts, file_space, mem_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_select_write() */ +} /* end H5D__select_write() */ |