diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-03 00:04:42 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-03 00:04:42 (GMT) |
commit | 99237a729181c4143c91cf333575f27befd9cff3 (patch) | |
tree | c81b7db0749487dda4fcea26f5a225584938ee04 /test/vfd_swmr.c | |
parent | c7518ef2995ed060761c375223e797ea2f8c24bf (diff) | |
download | hdf5-99237a729181c4143c91cf333575f27befd9cff3.zip hdf5-99237a729181c4143c91cf333575f27befd9cff3.tar.gz hdf5-99237a729181c4143c91cf333575f27befd9cff3.tar.bz2 |
Switch to using H5_nanosleep() instead of HDnanosleep()
* Just in the main library and test/vfd_swmr.c
* VFD SWMR acceptance tests still use HDnanosleep() directly
Diffstat (limited to 'test/vfd_swmr.c')
-rw-r--r-- | test/vfd_swmr.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 321f85f..09188f6 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -824,19 +824,13 @@ error: return 1; } /* test_writer_create_open_flush() */ -/* 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 */ static 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 (HDnanosleep(&delay, &delay) == -1 && errno == EINTR) - ; // do nothing + H5_nanosleep(nsec); } |