#include <linux/debugfs.h>
#include <linux/rculist.h>
#include <asm/byteorder.h>
+#include <linux/swab.h>
#include <probes/lttng.h>
#include <probes/lttng-types.h>
case 2: \
{ \
union { _type t; int16_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab16s(&__tmp.v); \
__ctf_tmp_int64 = (int64_t) __tmp.v; \
break; \
} \
case 4: \
{ \
union { _type t; int32_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab32s(&__tmp.v); \
__ctf_tmp_int64 = (int64_t) __tmp.v; \
break; \
} \
case 8: \
{ \
union { _type t; int64_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab64s(&__tmp.v); \
__ctf_tmp_int64 = (int64_t) __tmp.v; \
break; \
} \
case 2: \
{ \
union { _type t; uint16_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab16s(&__tmp.v); \
__ctf_tmp_uint64 = (uint64_t) __tmp.v; \
break; \
} \
case 4: \
{ \
union { _type t; uint32_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab32s(&__tmp.v); \
__ctf_tmp_uint64 = (uint64_t) __tmp.v; \
break; \
} \
case 8: \
{ \
union { _type t; uint64_t v; } __tmp = { (_type) (_src) }; \
+ if (_byte_order != __BYTE_ORDER) \
+ __swab64s(&__tmp.v); \
__ctf_tmp_uint64 = (uint64_t) __tmp.v; \
break; \
} \