HPCToolkit
fence_enum.h
Go to the documentation of this file.
1
#ifndef FENCE_ENUM
2
#define FENCE_ENUM
3
4
#define FENCE_ENUMS \
5
_MM(NONE) \
6
_MM(MAIN) \
7
_MM(THREAD) \
8
_MM(TRAMP) \
9
_MM(BAD)
10
11
typedef
enum
{
12
#define _MM(a) FENCE_ ## a,
13
FENCE_ENUMS
14
#undef _MM
15
}
fence_enum_t
;
16
17
static
char
*
fence_enum_names
[] = {
18
#define _MM(a) [FENCE_ ## a] = "FENCE_" #a,
19
FENCE_ENUMS
20
#undef _MM
21
};
22
23
static
inline
char
*
24
fence_enum_name
(
fence_enum_t
f)
25
{
26
if
(f < FENCE_NONE || f > FENCE_BAD)
27
return
"FENCE_UNINITIALIZED!!"
;
28
return
fence_enum_names
[f];
29
}
30
31
#endif // FENCE_ENUM
fence_enum_t
fence_enum_t
Definition:
fence_enum.h:11
FENCE_ENUMS
#define FENCE_ENUMS
Definition:
fence_enum.h:4
fence_enum_names
static char * fence_enum_names[]
Definition:
fence_enum.h:17
fence_enum_name
static char * fence_enum_name(fence_enum_t f)
Definition:
fence_enum.h:24
src
tool
hpcrun
unwind
common
fence_enum.h
Generated by
1.8.13