summaryrefslogtreecommitdiffstats
path: root/src/H5FDvfd_swmr.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-04-21 19:17:15 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-04-21 19:17:15 (GMT)
commit1d9ab42c5716533e9bf58c678a5c8de1ede3f0a8 (patch)
treea39530f213e53c37c1e618280342889ebedcb4a1 /src/H5FDvfd_swmr.c
parentea51b2e095c2ffeedc8bb7fee7dd373905e1806d (diff)
downloadhdf5-1d9ab42c5716533e9bf58c678a5c8de1ede3f0a8.zip
hdf5-1d9ab42c5716533e9bf58c678a5c8de1ede3f0a8.tar.gz
hdf5-1d9ab42c5716533e9bf58c678a5c8de1ede3f0a8.tar.bz2
Add a second bool argument to H5F_vfd_swmr_writer_end_of_tick() that
tells whether the call may wait for the reader tick to catch up. Add stub routines vfd_swmr_writer_may_increase_tick_to() and vfd_swmr_reader_did_increase_tick_to() for tests---e.g., vfd_swmr_zoo_writer/_reader---to use to coordinate their tick numbers. vfd_swmr_writer_may_increase_tick_to(new_tick, wait_for_reader) returns true if the writer may increase its tick number to `new_tick` without overrunning the reader. A reader uses vfd_swmr_reader_did_increase_tick_to() to tell a writer that its tick number has increased.
Diffstat (limited to 'src/H5FDvfd_swmr.c')
-rw-r--r--src/H5FDvfd_swmr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c
index 9a255a7..b729c1c 100644
--- a/src/H5FDvfd_swmr.c
+++ b/src/H5FDvfd_swmr.c
@@ -391,6 +391,8 @@ H5FD_vfd_swmr_close(H5FD_t *_file)
/* Sanity check */
HDassert(file);
+ vfd_swmr_reader_did_increase_tick_to(0);
+
/* Close the underlying file */
if(file->hdf5_file_lf && H5FD_close(file->hdf5_file_lf) < 0)
/* Push error, but keep going */