summaryrefslogtreecommitdiffstats
path: root/src/H5FDvfd_swmr_private.h
diff options
context:
space:
mode:
authormyang6 <myang6@hdfgroup.org>2021-10-25 19:51:28 (GMT)
committermyang6 <myang6@hdfgroup.org>2021-10-25 19:51:28 (GMT)
commit09e891477e3946e48d2216e06aca150ad5f2ddb3 (patch)
tree6c37cc6c9f593b6046b2d4a9a8ef66c6c58b65cb /src/H5FDvfd_swmr_private.h
parentd89fb6e09c0e4c8470a919082ac292c8d23c8fab (diff)
downloadhdf5-09e891477e3946e48d2216e06aca150ad5f2ddb3.zip
hdf5-09e891477e3946e48d2216e06aca150ad5f2ddb3.tar.gz
hdf5-09e891477e3946e48d2216e06aca150ad5f2ddb3.tar.bz2
Update comments, formats etc.
Diffstat (limited to 'src/H5FDvfd_swmr_private.h')
-rw-r--r--src/H5FDvfd_swmr_private.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h
index bc5c177..333bcc7 100644
--- a/src/H5FDvfd_swmr_private.h
+++ b/src/H5FDvfd_swmr_private.h
@@ -88,14 +88,33 @@ H5_DLL herr_t H5F_dump_eot_queue(void);
/* Log Macros and Functions */
/***************************************/
+/* VFD SWMR Helper macros to calcuate the elapsed time */
+/* The total time in seconds */
#define TOTAL_TIME_PASSED(X, Y) \
((double)((Y.tv_sec - X.tv_sec) * 1000000000 + (Y.tv_nsec - X.tv_nsec))) / 1000000000.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)
+*/
/* Add more tags */
-static const char *H5Fvfd_swmr_log_tags[] = {"FILE_OPEN", "FILE_CLOSE", "EOT_TRIGGER_TIME",
- "EOT_PROCESSING_TIME", "EOT_META_FILE_INDEX"};
+/* The VFD SMWR Log tags. Note this array of string is used to generate the
+ * entry tag by the log reporting function H5F_POST_VFD_SWMR_LOG_ENTRY.
+ * If the entry code is 0, H5Fvfd_swmr_log_tags[0] is used to report the entry tag.
+ * H5F_POST_VFD_SWMR_LOG_ENTRY(f, 3, log_msg) will put the log_msg attached to
+ * the entry tag "EOT_PROCESSING_TIME".
+ */
+/* clang-format off */
+/* The entry code number is listed in the comment for convenience. */
+static const char *H5Fvfd_swmr_log_tags[] = {
+ "FILE_OPEN", /* 0 */
+ "FILE_CLOSE", /* 1 */
+ "EOT_TRIGGER_TIME", /* 2 */
+ "EOT_PROCESSING_TIME", /* 3 */
+ "EOT_META_FILE_INDEX" /* 4 */
+ };
+/* clang-format on */
#endif /* H5FDvfd_swmr_private_H */