summaryrefslogtreecommitdiffstats
path: root/src/H5MPprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-01-10 20:26:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-01-10 20:26:02 (GMT)
commitf8da76cb9f96d4b233ac9dcb896f9df74e803f38 (patch)
treeb23e28d99b9391163e25d84daabb09906998078f /src/H5MPprivate.h
parent71ca572047b5d73b200eb761bc1234f3b6c4783d (diff)
downloadhdf5-f8da76cb9f96d4b233ac9dcb896f9df74e803f38.zip
hdf5-f8da76cb9f96d4b233ac9dcb896f9df74e803f38.tar.gz
hdf5-f8da76cb9f96d4b233ac9dcb896f9df74e803f38.tar.bz2
[svn-r6266] Purpose:
Code cleanup/new feature. Description: Split FUNC_LEAVE into API and non-API specific versions. This allows a solution to compiling this branch with C++, as well as reducing the size of the binaries produced. Platforms tested: FreeBSD 4.7 (sleipnir) w/serial, parallel (including MPE) & thread-safe
Diffstat (limited to 'src/H5MPprivate.h')
-rw-r--r--src/H5MPprivate.h30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h
index 78d2c81..d482369 100644
--- a/src/H5MPprivate.h
+++ b/src/H5MPprivate.h
@@ -40,28 +40,19 @@
#define MPE_LOG_VARS(func_name) \
static int eventa(func_name) = -1; \
static int eventb(func_name) = -1; \
- static int eventc(func_name) = 0; \
- int * p_eventb = &eventb(func_name); \
+/* static int eventc(func_name) = 0; */ \
char* p_end_funcname = #func_name; \
- char* p_event_start = "start" #func_name; \
- int * p_eventc = & eventc(func_name);
-/* the following is for the elimination of "unused variable" warning */
-#define MPE_LOG_VARS_USE(func_name) \
- eventa(func_name) = eventa(func_name); \
- eventb(func_name) = eventb(func_name); \
- eventc(func_name) = eventc(func_name); \
- p_eventc = p_eventc; \
- p_event_start = p_event_start;
+ char* p_event_start = "start" #func_name;
-#define BEGIN_MPE_LOG(func_name) \
+#define BEGIN_MPE_LOG(func_name) \
if (H5_MPEinit_g){ \
- if (H5_MPEinit_g && eventa(func_name) == -1 && eventb(func_name) == -1) { \
+ if (H5_MPEinit_g && eventa(func_name) == -1 && eventb(func_name) == -1) { \
char* p_color = COLOR(func_name); \
eventa(func_name)=MPE_Log_get_event_number(); \
eventb(func_name)=MPE_Log_get_event_number(); \
- MPE_Describe_state(eventa(func_name), eventb(func_name), p_end_funcname,p_color); \
+ MPE_Describe_state(eventa(func_name), eventb(func_name), p_end_funcname,p_color); \
} \
- MPE_Log_event(eventa(func_name), 0, p_event_start); \
+ MPE_Log_event(eventa(func_name), 0, p_event_start); \
}
@@ -72,8 +63,8 @@
* Programmer: Long Wang
*/
#define FINISH_MPE_LOG \
- if (H5_IS_API(FUNC) && H5_MPEinit_g) { \
- MPE_Log_event(*p_eventb, 0, p_end_funcname); \
+ if (H5_MPEinit_g) { \
+ MPE_Log_event(eventb(func_name), 0, p_end_funcname); \
/* eventc(func_name)++ */ \
}
@@ -388,12 +379,7 @@
#define color_H5Zunregister "red"
#else
-#define eventa(func_name) /* void */
-#define eventb(func_name) /* void */
-#define eventc(func_name) /* void */
#define MPE_LOG_VARS(func_name) /* void */
-#define MPE_LOG_VARS_USE(func_name) /* void */
-#define COLOR(func_name) /* void */
#define BEGIN_MPE_LOG(func_name) /* void */
#define FINISH_MPE_LOG /* void */