X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.h;h=da2637d7800e88cc70c61f1898ac88525a9327bb;hb=fd6f8c5b5963cd84454314fce8870e75fb23de64;hp=13b6abf5cf0d4e7c1fc64c0fa4c3d364f50344e4;hpb=b3fdf78b15beb940918da1e41eb68e24ba31bb87;p=lttng-modules.git diff --git a/lttng-events.h b/lttng-events.h index 13b6abf5..da2637d7 100644 --- a/lttng-events.h +++ b/lttng-events.h @@ -22,7 +22,7 @@ #include #include -#define lttng_is_signed_type(type) (((type)(-1)) < 0) +#define lttng_is_signed_type(type) (((type) -1) < (type) 1) struct lttng_channel; struct lttng_session; @@ -75,7 +75,7 @@ struct lttng_enum_entry { }; #define __type_integer(_type, _size, _alignment, _signedness, \ - _byte_order, _base, _encoding) \ + _byte_order, _user, _base, _encoding) \ { \ .atype = atype_integer, \ .u.basic.integer = \ @@ -83,8 +83,9 @@ struct lttng_enum_entry { .size = (_size) ? : sizeof(_type) * CHAR_BIT, \ .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \ .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \ - .reverse_byte_order = _byte_order != __BYTE_ORDER, \ - .base = _base, \ + .reverse_byte_order = (_byte_order) != __BYTE_ORDER, \ + .base = (_base), \ + .user = (_user), \ .encoding = lttng_encode_##_encoding, \ }, \ } \ @@ -93,7 +94,8 @@ struct lttng_integer_type { unsigned int size; /* in bits */ unsigned short alignment; /* in bits */ unsigned int signedness:1, - reverse_byte_order:1; + reverse_byte_order:1, + user:1; /* fetch from user-space */ unsigned int base; /* 2, 8, 10, 16, for pretty print */ enum lttng_string_encodings encoding; }; @@ -106,6 +108,7 @@ union _lttng_basic_type { } enumeration; struct { enum lttng_string_encodings encoding; + unsigned int user:1; /* fetch from user-space */ } string; }; @@ -161,8 +164,7 @@ struct lttng_enum_desc { struct lttng_event_field { const char *name; struct lttng_type type; - unsigned int nowrite:1, /* do not write into trace */ - user:1; /* fetch from user-space */ + unsigned int nowrite:1; /* do not write into trace */ }; union lttng_ctx_value { @@ -693,13 +695,13 @@ static inline int lttng_syscalls_destroy(struct lttng_channel *chan) } static inline int lttng_syscall_filter_enable(struct lttng_channel *chan, - struct lttng_event *event); + struct lttng_event *event) { return -ENOSYS; } static inline int lttng_syscall_filter_disable(struct lttng_channel *chan, - struct lttng_event *event); + struct lttng_event *event) { return -ENOSYS; }