blob: 2f7643cadf9c291b7ad8654fd25f7da0681bb8e4 [file] [log] [blame]
Dmitry V. Levin0e097042016-04-26 00:08:16 +00001#ifndef STRACE_XLAT_H
2
Jeff Mahoney9019cf42016-04-28 11:26:59 -04003# include <stdint.h>
4
Dmitry V. Levin0e097042016-04-26 00:08:16 +00005struct xlat {
Jeff Mahoney9019cf42016-04-28 11:26:59 -04006 uint64_t val;
Dmitry V. Levin0e097042016-04-26 00:08:16 +00007 const char *str;
8};
9
Dmitry V. Levina9f956d2016-04-28 23:52:28 +000010# define XLAT(val) { (unsigned)(val), #val }
Dmitry V. Levin3f25b652016-04-28 23:58:34 +000011# define XLAT_PAIR(val, str) { (unsigned)(val), str }
Dmitry V. Levin0f498262016-04-29 00:03:48 +000012# define XLAT_TYPE(type, val) { (type)(val), #val }
Dmitry V. Levin070fec22016-04-29 20:04:38 +000013# define XLAT_TYPE_PAIR(type, val, str) { (type)(val), str }
Dmitry V. Levina9f956d2016-04-28 23:52:28 +000014# define XLAT_END { 0, 0 }
Dmitry V. Levin0e097042016-04-26 00:08:16 +000015
16#endif