diff options
author | David Young <dyoung@hdfgroup.org> | 2019-08-28 17:58:08 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-08-28 17:58:08 (GMT) |
commit | e178ab0e11a6d4ac8f3541549b03cfff1456b38a (patch) | |
tree | deda52aa62bbdab198c95996999a408aa509950f /src/H5FDvfd_swmr_private.h | |
parent | 1f728439ddf4ac94d49ddd14fb72982b66b814fd (diff) | |
download | hdf5-e178ab0e11a6d4ac8f3541549b03cfff1456b38a.zip hdf5-e178ab0e11a6d4ac8f3541549b03cfff1456b38a.tar.gz hdf5-e178ab0e11a6d4ac8f3541549b03cfff1456b38a.tar.bz2 |
Consolidate VFD SWMR variable declarations in a new header file,
H5FDvfd_swmr_private.h.
Perform tick processing in FUNC_ENTER_API_NOCLEAR, where it was missing.
Track the number of times the HDF5 library has been entered/exited through its
public API. Only perform tick processing on the first entry and last exit.
This stops us from performing tick processing in API calls invoked by
application callbacks. Performing tick processing in nested API calls led to
crashes.
Note well: FUNC_LEAVE_API now performs tick processing even on an error exit!
Previously, it did not. I'm not sure if the change is ok.
Diffstat (limited to 'src/H5FDvfd_swmr_private.h')
-rw-r--r-- | src/H5FDvfd_swmr_private.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h new file mode 100644 index 0000000..54398dd --- /dev/null +++ b/src/H5FDvfd_swmr_private.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2019 The HDF Group. All rights reserved. + * + * This file is part of HDF5. The full HDF5 copyright notice, including + * terms governing use, modification, and redistribution, is contained in + * the COPYING file, which can be found at the root of the source code + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. + * If you do not have access to either file, you may request a copy from + * help@hdfgroup.org. + */ + +#ifndef _H5FDvfd_swmr_private_H +#define _H5FDvfd_swmr_private_H + +/* Temporary globals for VFD SWMR */ +extern hbool_t vfd_swmr_g; +extern unsigned int vfd_swmr_api_entries_g; +extern hbool_t vfd_swmr_writer_g; +extern uint64_t tick_num_g; +extern struct timespec end_of_tick_g; + +H5_DLL herr_t H5F_vfd_swmr_writer_end_of_tick(void); +H5_DLL herr_t H5F_vfd_swmr_reader_end_of_tick(void); + +#endif /* _H5FDvfd_swmr_private_H */ |