diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2021-04-05 16:29:15 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2021-04-05 16:29:15 (GMT) |
commit | da80917711737e600fceda8f1068f0b35f2eda25 (patch) | |
tree | 4fa2a8c59c7ecf90a76dd830ad3f81e768d03b94 /test/vfd_swmr_common.c | |
parent | 209a194993925166dd70815059e437074a3c2be4 (diff) | |
download | hdf5-da80917711737e600fceda8f1068f0b35f2eda25.zip hdf5-da80917711737e600fceda8f1068f0b35f2eda25.tar.gz hdf5-da80917711737e600fceda8f1068f0b35f2eda25.tar.bz2 |
Two main changes include: re-arranging the communication between the writer and reader through the named pipes; using the error report consistent with other tests.
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r-- | test/vfd_swmr_common.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 0a5025d..f7152b9 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -72,19 +72,13 @@ below_speed_limit(struct timespec *last, const struct timespec *ival) return result; } -/* Sleep for `tenths` tenths of a second. - * - * This routine may quietly perform a too-short sleep if an error occurs - * in nanosleep(2). - */ +/* Sleep for `tenths` tenths of a second. */ void decisleep(uint32_t tenths) { - struct timespec delay = {.tv_sec = tenths / 10, - .tv_nsec = tenths * 100 * 1000 * 1000}; + uint64_t nsec = tenths * 100 * 1000 * 1000; - while (nanosleep(&delay, &delay) == -1 && errno == EINTR) - ; // do nothing + H5_nanosleep(nsec); } /* Like vsnprintf(3), but abort the program with an error message on |