diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2021-03-25 22:42:01 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2021-03-25 22:42:01 (GMT) |
commit | 998aca32e6336bed6286885a03498c78dadfe511 (patch) | |
tree | b7ebeb1e37bae109c67a7733b94aafaf9e27dd07 /test/vfd_swmr_common.h | |
parent | 9835edcdad2cfb567c7d8af98e8dbbaa4e712eca (diff) | |
parent | c81afbff45edb56b16d17d37c444485b587d51fd (diff) | |
download | hdf5-998aca32e6336bed6286885a03498c78dadfe511.zip hdf5-998aca32e6336bed6286885a03498c78dadfe511.tar.gz hdf5-998aca32e6336bed6286885a03498c78dadfe511.tar.bz2 |
Merge branch 'feature/vfd_swmr' of https://github.com/HDFGroup/hdf5 into raylu_zoo_test
Diffstat (limited to 'test/vfd_swmr_common.h')
-rw-r--r-- | test/vfd_swmr_common.h | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index b798328..01bc725 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -27,9 +26,9 @@ /* The maximum # of records to add/remove from the dataset in one step, * used by vfd_swmr_addrem_writer and vfd_swmr_remove_reader. */ -#define MAX_SIZE_CHANGE 10 +#define MAX_SIZE_CHANGE 10 -#define VFD_SWMR_FILENAME "vfd_swmr_data.h5" /* SWMR test file name */ +#define VFD_SWMR_FILENAME "vfd_swmr_data.h5" /* SWMR test file name */ /* The message sent by writer that the file open is done--releasing the file lock */ #define VFD_SWMR_WRITER_MESSAGE "VFD_SWMR_WRITER_MESSAGE" @@ -40,19 +39,17 @@ typedef struct _estack_state { H5E_auto_t efunc; - void *edata; + void * edata; } estack_state_t; -typedef enum _testsel { - TEST_NONE = 0 -, TEST_NULL -, TEST_OOB -} testsel_t; +typedef enum _testsel { TEST_NONE = 0, TEST_NULL, TEST_OOB } testsel_t; /********************/ /* Global Variables */ /********************/ +H5TEST_DLLVAR int verbosity; + /**************/ /* Prototypes */ /**************/ @@ -65,26 +62,24 @@ H5TEST_DLL void decisleep(uint32_t tenths); 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); - +H5TEST_DLL void restore_estack(estack_state_t); +#ifndef H5_HAVE_WIN32_API H5TEST_DLL void block_signals(sigset_t *); H5TEST_DLL void restore_signals(sigset_t *); H5TEST_DLL void await_signal(hid_t); +#endif /* H5_HAVE_WIN32_API */ -H5TEST_DLL hid_t -vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_pages, - H5F_vfd_swmr_config_t *config); +H5TEST_DLL hid_t vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_pages, + H5F_vfd_swmr_config_t *config); -H5TEST_DLL void -init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, hbool_t writer, - hbool_t flush_raw_data, uint32_t md_pages_reserved, const char *md_file_fmtstr, ...) - H5_ATTR_FORMAT(printf, 7, 8); +H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, + hbool_t writer, hbool_t flush_raw_data, uint32_t md_pages_reserved, + const char *md_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 7, 8); H5TEST_DLL void dbgf(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3); H5TEST_DLL void evsnprintf(char *, size_t, const char *, va_list); -H5TEST_DLL void esnprintf(char *, size_t, const char *, ...) - H5_ATTR_FORMAT(printf, 3, 4); +H5TEST_DLL void esnprintf(char *, size_t, const char *, ...) H5_ATTR_FORMAT(printf, 3, 4); H5TEST_DLL int fetch_env_ulong(const char *, unsigned long, unsigned long *); @@ -92,6 +87,4 @@ H5TEST_DLL int fetch_env_ulong(const char *, unsigned long, unsigned long *); } #endif -extern int verbosity; - #endif /* SWMR_COMMON_H */ |