summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormyang6 <myang6@hdfgroup.org>2021-10-15 21:54:33 (GMT)
committermyang6 <myang6@hdfgroup.org>2021-10-15 21:54:33 (GMT)
commitde46905677068ce5f7fbaec9cad5becc037b0894 (patch)
treec3763acc183e2a4bb2ead4920bb3599db1b44d5b /src
parent217a7589836ecb8679aaeb68dbc3d9c7529ab84b (diff)
parent519c50b981eb3d719c4e6a96a899689df0109195 (diff)
downloadhdf5-de46905677068ce5f7fbaec9cad5becc037b0894.zip
hdf5-de46905677068ce5f7fbaec9cad5becc037b0894.tar.gz
hdf5-de46905677068ce5f7fbaec9cad5becc037b0894.tar.bz2
Merge branch 'vfd_swmr_log' of https://github.com/kyang2014/hdf5 into vfd_swmr_log
Diffstat (limited to 'src')
-rw-r--r--src/H5FDvfd_swmr_private.h12
-rw-r--r--src/H5Pfapl.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h
index 280ea2f..56cb93e 100644
--- a/src/H5FDvfd_swmr_private.h
+++ b/src/H5FDvfd_swmr_private.h
@@ -57,14 +57,14 @@ typedef struct eot_queue_entry {
TAILQ_ENTRY(eot_queue_entry) link;
} eot_queue_entry_t;
-#define TOTAL_TIME_PASSED(X, Y) \
+#define TOTAL_TIME_PASSED(X, Y) \
((double)((Y.tv_sec - X.tv_sec) * 1000000000 + (Y.tv_nsec - X.tv_nsec))) / 1000000.0
-#define TIME_PASSED_MIN(X) (unsigned int)(X/60000)
-#define TIME_PASSED_SEC(X,Y) (unsigned int)((X-Y*60000)/1000)
-#define TIME_PASSED_MSEC(X,Y,Z) (unsigned int)(X-Y*60000-Z*1000)
-//H5_DLLVAR extern hbool_t vfd_swmr_log_on;
-//H5_DLLVAR extern FILE *vfd_swmr_log_file_ptr;
+#define TIME_PASSED_MIN(X) (unsigned int)(X / 60000)
+#define TIME_PASSED_SEC(X, Y) (unsigned int)((X - Y * 60000) / 1000)
+#define TIME_PASSED_MSEC(X, Y, Z) (unsigned int)(X - Y * 60000 - Z * 1000)
+// H5_DLLVAR extern hbool_t vfd_swmr_log_on;
+// H5_DLLVAR extern FILE *vfd_swmr_log_file_ptr;
H5_DLLVAR unsigned int vfd_swmr_api_entries_g;
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 35bb09e..3b39f12 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5711,7 +5711,7 @@ H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_file_path is too long")
name_len = HDstrlen(config_ptr->log_file_path);
- if(name_len >H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
+ if (name_len > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "log_file_path is too long")
/* Set the modified config */