summaryrefslogtreecommitdiffstats
path: root/src/H5Pfapl.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-09-04 04:11:36 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-09-04 04:11:36 (GMT)
commit1daccbded796d1474ff95458948875c635df6622 (patch)
treeb88a03491cc9212836c1b457597e8089ecc77282 /src/H5Pfapl.c
parentd926ddb1a240fb46748ae9d8e1c9ce42d9860d6e (diff)
downloadhdf5-1daccbded796d1474ff95458948875c635df6622.zip
hdf5-1daccbded796d1474ff95458948875c635df6622.tar.gz
hdf5-1daccbded796d1474ff95458948875c635df6622.tar.bz2
Second batch of checkin:
1) Define driver for the VFD SWMR reader 2) Implement VFD SWMR open callback 3) Implement H5FD_vfd_swmr_get_tick_and_idx() 4) Load and decode metadata file header and index 4) Closing for VFD SWMR
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r--src/H5Pfapl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index a0291e6..5f30b0a 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -41,11 +41,12 @@
#include "H5Ppkg.h" /* Property lists */
/* Includes needed to set as default file driver */
-#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
+#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
#include "H5FDstdio.h" /* Standard C buffered I/O */
#ifdef H5_HAVE_WINDOWS
#include "H5FDwindows.h" /* Win32 I/O */
#endif
+#include "H5FDvfd_swmr.h" /* Posix unbuffered I/O file driver */
/****************/
@@ -5058,6 +5059,9 @@ done:
* Function: H5Pset_vfd_swmr_config
*
* Purpose: Set VFD SWMR configuration in the target FAPL.
+ * Note: Hard-wired to set the driver in the fapl
+ * to use the SWMR VFD driver; this will be changed
+ * later
*
* Return: Non-negative on success/Negative on failure
*
@@ -5112,6 +5116,12 @@ H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr)
if(H5P_set(plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, config_ptr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache initial config")
+ /* Hard-wired to use SWMR VFD */
+ if(!config_ptr->vfd_swmr_writer) {
+ if(H5P_set_driver(plist, H5FD_VFD_SWMR, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VFD SWMR driver info")
+ }
+
done:
FUNC_LEAVE_API(ret_value)
} /* H5Pset_vfd_swmr_config() */