Dmitry V. Levin | 0e09704 | 2016-04-26 00:08:16 +0000 | [diff] [blame] | 1 | #ifndef STRACE_XLAT_H |
| 2 | |
Jeff Mahoney | 9019cf4 | 2016-04-28 11:26:59 -0400 | [diff] [blame] | 3 | # include <stdint.h> |
| 4 | |
Dmitry V. Levin | 0e09704 | 2016-04-26 00:08:16 +0000 | [diff] [blame] | 5 | struct xlat { |
Jeff Mahoney | 9019cf4 | 2016-04-28 11:26:59 -0400 | [diff] [blame] | 6 | uint64_t val; |
Dmitry V. Levin | 0e09704 | 2016-04-26 00:08:16 +0000 | [diff] [blame] | 7 | const char *str; |
| 8 | }; |
| 9 | |
Dmitry V. Levin | a9f956d | 2016-04-28 23:52:28 +0000 | [diff] [blame] | 10 | # define XLAT(val) { (unsigned)(val), #val } |
Dmitry V. Levin | 3f25b65 | 2016-04-28 23:58:34 +0000 | [diff] [blame] | 11 | # define XLAT_PAIR(val, str) { (unsigned)(val), str } |
Dmitry V. Levin | 0f49826 | 2016-04-29 00:03:48 +0000 | [diff] [blame] | 12 | # define XLAT_TYPE(type, val) { (type)(val), #val } |
Dmitry V. Levin | 070fec2 | 2016-04-29 20:04:38 +0000 | [diff] [blame] | 13 | # define XLAT_TYPE_PAIR(type, val, str) { (type)(val), str } |
Dmitry V. Levin | a9f956d | 2016-04-28 23:52:28 +0000 | [diff] [blame] | 14 | # define XLAT_END { 0, 0 } |
Dmitry V. Levin | 0e09704 | 2016-04-26 00:08:16 +0000 | [diff] [blame] | 15 | |
| 16 | #endif |