diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-16 20:30:27 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-16 20:30:27 (GMT) |
commit | 21f3fae46982195f88b37471896bb68668dff633 (patch) | |
tree | 7650bda6a9dbfe5619ee1cf459decd2eec34eee8 | |
parent | 86be273386b23c56300dd53705524eb269127b4a (diff) | |
download | hdf5-21f3fae46982195f88b37471896bb68668dff633.zip hdf5-21f3fae46982195f88b37471896bb68668dff633.tar.gz hdf5-21f3fae46982195f88b37471896bb68668dff633.tar.bz2 |
Refactor: extract subroutine estack_get_state() for reuse in a commit
that's coming soon.
-rw-r--r-- | test/vfd_swmr_common.c | 11 | ||||
-rw-r--r-- | test/vfd_swmr_common.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 5625dd3..f851110 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -49,10 +49,19 @@ dbgf(int level, const char *fmt, ...) estack_state_t disable_estack(void) { + estack_state_t es = estack_get_state(); + + (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL); + + return es; +} + +estack_state_t +estack_get_state(void) +{ estack_state_t es; (void)H5Eget_auto(H5E_DEFAULT, &es.efunc, &es.edata); - (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL); return es; } diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index 7998d29..618e4ff 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -80,6 +80,7 @@ H5TEST_DLLVAR unsigned symbol_count[NLEVELS]; extern "C" { #endif +H5TEST_DLL estack_state_t estack_get_state(void); H5TEST_DLL estack_state_t disable_estack(void); H5TEST_DLL void restore_estack(estack_state_t); |