summaryrefslogtreecommitdiffstats
path: root/src/H5FDsplitter.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-30 18:02:42 (GMT)
committerGitHub <noreply@github.com>2021-06-30 18:02:42 (GMT)
commitb9dbabc1523c13627ada0bcb04d780e7ad93b658 (patch)
tree9e7ce4dab9a0a559fb61666d821fbe7ff52fc601 /src/H5FDsplitter.c
parent18c08c5adc3fbc0e5b36fff9e97ead10da655e9a (diff)
downloadhdf5-b9dbabc1523c13627ada0bcb04d780e7ad93b658.zip
hdf5-b9dbabc1523c13627ada0bcb04d780e7ad93b658.tar.gz
hdf5-b9dbabc1523c13627ada0bcb04d780e7ad93b658.tar.bz2
VFD SWMR: Sync with develop (#811)
* Normalization with develop * Removes checks and work-arounds for strtoll and strtoull (#769) * Removes checks for (v)snprintf, which are C99 (#772) * Update missing release note info. (#776) * Replaces the H5_OVERRIDE macro with override (#773) The macro is no longer necessary now that we require C++11. * Cleans up some POSIX header bits in H5private.h (#783) * Removes outdated checks for ways inline might be defined (#781) These are obsolete now that we require C99. * Removes checks for system(), which is C89/90 (#782) * Removes C++ dependency on H5private.h (#774) * Removes C++ dependency on H5private.h Most C API calls have been removed, aside from a few uses of free, where we just dropped the 'HD'. A couple of H5_ATTR_UNUSED macros were also replaced with (void) statements. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Further simplifies Autotools type size checks (#789) Also fixes an issue where clock_gettime and difftime are not detected due to earlier simplifications of this code. * Release Note (#784) * Normalization of CMake H5pubconf.h with Autotools (#791) Mostly just moving things around and changing the comments to keep the delta small. The only symbol change is that for curl/curl.h which I changed to H5_HAVE_CURL_CURL_H to match the Autotools. This symbol is not used in the library and is just an artifact of the checks. * Fix tools test (#794) * Removes ancient Autotools cruft (#790) * Reorganization of C and POSIX headers in H5public.h & H5private.h (#793) * Reorganization of C and POSIX headers in H5public.h & H5private.h Consolidated and removed duplicates * It turns out Windows has sys/types.h Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Removes checks for signal and set/longjmp, which are C89 (#798) Also removes checks for setjmp.h and stddef.h * Assume frexpl/f and fabsl/f, which are C99 (#799) * Assume the library has C99 types in C++ type code (#806) * Assume the library has C99 types in C++ type code * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes obsolete equivalents of C99's __func__ (#800) * Cleans up POSIX/C bits in H5private.h (#804) * Cleans up POSIX/C bits in H5private.h * Assume difftime exists (C89) * Reorg AC_CHECK_HEADERS so headers are in alphabetical order * Split off networking-related AC_CHECK_HEADERS * Remove unused UNAME_CYGWIN from configure.ac * Remove checks for unused sys/timeb.h * Tidying pass over H5private.h HD prefix macros * Tidy H5win32defs.h * Add HD prefix to various scanf calls * Committing clang-format changes * Fixes to the alarm(2) code used in the tests to make Windows happy Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Brings the tools getopt(3) replacement into the main library (#803) * Moves get_option from the tools library to the C library * Adds H5 prefix to get_option call and variables * Renames the H5_get_option long options struct and enum * Removes type guesses when C99 types are missing (#807) * Assume C99 types exist in H5detect.c (#808) * Fixes parallel issues from recent C99 changes * Adds MPE FUNC --> __func__ changes missed in earlier PRs * Fix typo * Fixes parallel issues from recent C99 changes (#809) * Fixes parallel issues from recent C99 changes * Adds MPE FUNC --> __func__ changes missed in earlier PRs * Even more missed FUNC --> __func__ macros * Removes remaining H5_TIME_WITH_SYS_TIME cruft (#810) Mostly from CMake Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'src/H5FDsplitter.c')
-rw-r--r--src/H5FDsplitter.c80
1 files changed, 41 insertions, 39 deletions
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index 99d7100..91a8e84 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -188,7 +188,7 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
if (H5FD_splitter_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize splitter VFD")
@@ -214,7 +214,7 @@ H5FD_splitter_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
if (H5I_VFL != H5I_get_type(H5FD_SPLITTER_g))
H5FD_SPLITTER_g = H5FDregister(&H5FD_splitter_g);
@@ -238,7 +238,7 @@ H5FD__splitter_term(void)
{
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Reset VFL ID */
H5FD_SPLITTER_g = 0;
@@ -263,7 +263,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(id_out_ptr != NULL);
@@ -301,7 +301,7 @@ H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *vfd_config)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, vfd_config);
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
if (H5FD_SPLITTER_MAGIC != vfd_config->magic)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid configuration (magic number mismatch)")
@@ -389,7 +389,7 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", fapl_id, config);
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
@@ -443,13 +443,13 @@ H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Public API for dxpl "context" */
if (H5FDflush(file->rw_file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush R/W file")
if (H5FDflush(file->wo_file, dxpl_id, closing) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -478,7 +478,7 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -518,7 +518,7 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
@@ -528,7 +528,7 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr
if (H5FDwrite(file->rw_file, type, dxpl_id, addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "R/W file write failed")
if (H5FDwrite(file->wo_file, type, dxpl_id, addr, size, buf) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -554,7 +554,7 @@ H5FD__splitter_fapl_get(H5FD_t *_file)
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
ret_value = H5FD__splitter_fapl_copy(&(file->fa));
@@ -579,7 +579,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(old_fa_ptr);
@@ -623,7 +623,7 @@ H5FD__splitter_fapl_free(void *_fapl)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(fapl);
@@ -661,7 +661,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
if (!name || !*name)
@@ -717,7 +717,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
file_ptr->wo_file = H5FD_open(fapl_ptr->wo_path, flags, fapl_ptr->wo_fapl_id, HADDR_UNDEF);
if (!file_ptr->wo_file)
- H5FD_SPLITTER_WO_ERROR(file_ptr, FUNC, H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open W/O file")
+ H5FD_SPLITTER_WO_ERROR(file_ptr, __func__, H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open W/O file")
ret_value = (H5FD_t *)file_ptr;
@@ -758,7 +758,7 @@ H5FD__splitter_close(H5FD_t *_file)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -773,7 +773,8 @@ H5FD__splitter_close(H5FD_t *_file)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close R/W file")
if (file->wo_file)
if (H5FD_close(file->wo_file) == FAIL)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
+ "unable to close W/O file")
if (file->logfp) {
HDfclose(file->logfp);
@@ -808,7 +809,7 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -839,7 +840,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC)
+ H5FD_SPLITTER_LOG_CALL(__func__)
/* Sanity check */
HDassert(file);
@@ -850,7 +851,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file")
if (H5FD_set_eoa(file->wo_file, type, addr) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -876,7 +877,7 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -905,7 +906,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(file);
HDassert(file->rw_file);
@@ -915,7 +916,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file")
if (H5FDtruncate(file->wo_file, dxpl_id, closing) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -943,7 +944,7 @@ H5FD__splitter_sb_size(H5FD_t *_file)
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -971,7 +972,7 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -1002,7 +1003,7 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -1033,7 +1034,7 @@ H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(f1);
HDassert(f2);
@@ -1060,7 +1061,7 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);
@@ -1091,7 +1092,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
HDassert(file);
HDassert(file->rw_file);
@@ -1102,7 +1103,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
if (file->wo_file != NULL)
if (H5FD_lock(file->wo_file, rw) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1124,7 +1125,7 @@ H5FD__splitter_unlock(H5FD_t *_file)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);
@@ -1159,7 +1160,7 @@ H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
if (file) {
HDassert(file);
@@ -1196,7 +1197,7 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);
@@ -1207,7 +1208,8 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate for R/W file")
if (H5FDalloc(file->wo_file, type, dxpl_id, size) == HADDR_UNDEF)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to alloc for W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF,
+ "unable to alloc for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1229,7 +1231,7 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);
@@ -1259,7 +1261,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);
@@ -1269,7 +1271,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file")
if (H5FDfree(file->wo_file, type, dxpl_id, addr, size) < 0)
- H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file")
+ H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1290,7 +1292,7 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL(FUNC);
+ H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
HDassert(file);