summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-01-05 21:47:34 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-01-05 21:47:34 (GMT)
commit6a982a7690c7fbb9a714471673f008a0476a0f44 (patch)
treed37fb0037b983f32787b82a71ded6b698030a9a0 /tools/lib
parent671006a10da51ff3e174065fdf853af5a661788c (diff)
downloadhdf5-6a982a7690c7fbb9a714471673f008a0476a0f44.zip
hdf5-6a982a7690c7fbb9a714471673f008a0476a0f44.tar.gz
hdf5-6a982a7690c7fbb9a714471673f008a0476a0f44.tar.bz2
[svn-r25954] HDFFV-9046: reorganize hdf5/perform, step 2
Last changes had caused problems with Windows platform: 1. H5private.h in io_timer.h is not accessible in the distributed shared library of tools. Need to move it to io_timer.c. 2. debug_start_stop_time() would not be available outside of h5perf. Some favor of compiler does not like it. Screened it out for now. 3. mere "extern" is not good enough for Windows shared library. Must mark them as DLL. Need to mark them as "H5TOOLS_DLL". 4. STANDALONE mode is broken. Screened out the code for now. Tested; h5committest.
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/io_timer.c11
-rw-r--r--tools/lib/io_timer.h9
2 files changed, 13 insertions, 7 deletions
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index efe909d..78e7fe9 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "H5private.h"
#include "hdf5.h"
#ifdef H5_HAVE_PARALLEL
@@ -73,7 +74,7 @@ static double sub_time(struct timeval* a, struct timeval* b)
io_time_t *
io_time_new(clock_type type)
{
- io_time_t *pt = (io_time_t *)calloc(1, sizeof(struct io_time_t));
+ io_time_t *pt = (io_time_t *)HDcalloc(1, sizeof(struct io_time_t));
/* set global timer variable */
timer_g = pt;
@@ -197,12 +198,15 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
}
break;
default:
- fprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
+ HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
return (NULL);
break;
}
+#if 0
+ /* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */
debug_start_stop_time(pt, t, start_stop);
+#endif
return pt;
}
@@ -220,6 +224,9 @@ get_time(io_time_t *pt, timer_type t)
return pt->total_time[t];
}
+#if 0
+/* standalone is not working yet. Need fix later. -AKC- */
#ifdef STANDALONE
#include "pio_standalone.c"
#endif
+#endif
diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h
index 71738bf..4ce0733 100644
--- a/tools/lib/io_timer.h
+++ b/tools/lib/io_timer.h
@@ -17,7 +17,6 @@
#define IO_TIMER__
#include "hdf5.h"
-#include "H5private.h"
#if defined(H5_TIME_WITH_SYS_TIME)
# include <sys/time.h>
@@ -73,10 +72,10 @@ typedef struct io_time_t {
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-extern io_time_t *io_time_new(clock_type t);
-extern void io_time_destroy(io_time_t *pt);
-extern io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop);
-extern double get_time(io_time_t *pt, timer_type t);
+H5TOOLS_DLL io_time_t *io_time_new(clock_type t);
+H5TOOLS_DLL void io_time_destroy(io_time_t *pt);
+H5TOOLS_DLL io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop);
+H5TOOLS_DLL double get_time(io_time_t *pt, timer_type t);
#ifdef __cplusplus
}
#endif /* __cplusplus */