OpenMPI  0.1.1
vt_libcwrap.h
1 /**
2  * VampirTrace
3  * http://www.tu-dresden.de/zih/vampirtrace
4  *
5  * Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
6  *
7  * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
8  * Centre, Federal Republic of Germany
9  *
10  * See the file COPYING in the package base directory for details
11  **/
12 
13 #ifndef _VT_LIBCWRAP_H
14 #define _VT_LIBCWRAP_H
15 
16 #ifdef __cplusplus
17 # define EXTERN extern "C"
18 #else
19 # define EXTERN extern
20 #endif
21 
22 #if (defined(VT_LIBCWRAP))
23 
24 #define VT_ENABLE_LIBC_TRACING() vt_libc_tracing_enabled = 1
25 #define VT_DISABLE_LIBC_TRACING() vt_libc_tracing_enabled = 0
26 #define VT_SUSPEND_LIBC_TRACING() \
27  vt_libc_tracing_state = vt_libc_tracing_enabled; \
28  vt_libc_tracing_enabled = 0
29 #define VT_RESUME_LIBC_TRACING() \
30  vt_libc_tracing_enabled = vt_libc_tracing_state
31 
32 /* libc wrapper initialization */
33 EXTERN void vt_libcwrap_init(void);
34 
35 /* libc wrapper finalization */
36 EXTERN void vt_libcwrap_finalize(void);
37 
38 EXTERN int vt_libc_tracing_enabled;
39 EXTERN int vt_libc_tracing_state;
40 
41 #else /* VT_LIBCWRAP */
42 
43 #define VT_ENABLE_LIBC_TRACING()
44 #define VT_DISABLE_LIBC_TRACING()
45 #define VT_SUSPEND_LIBC_TRACING()
46 #define VT_RESUME_LIBC_TRACING()
47 
48 #endif
49 
50 #endif /* _VT_LIBCWRAP_H */
51