X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Ftracepoint.h;h=929a863ffc1e91d17056f3a40e2d9433bfab389b;hb=c8fcf224e283ed7679c84cbcccf70ac65ca7e41d;hp=831447dd64643dc754ec0aa6ad9cd39a12ce7d36;hpb=deb6e5408bafcab23cdd3e04b080134931d83906;p=lttng-ust.git diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 831447dd..929a863f 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -37,8 +37,18 @@ extern "C" { * fine too). * Each tuple is also separated by a comma. */ -#define _TP_COMBINE_TOKENS1(_tokena, _tokenb) _tokena##_tokenb -#define _TP_COMBINE_TOKENS(_tokena, _tokenb) _TP_COMBINE_TOKENS1(_tokena, _tokenb) +#define __TP_COMBINE_TOKENS(_tokena, _tokenb) \ + _tokena##_tokenb +#define _TP_COMBINE_TOKENS(_tokena, _tokenb) \ + __TP_COMBINE_TOKENS(_tokena, _tokenb) +#define __TP_COMBINE_TOKENS3(_tokena, _tokenb, _tokenc) \ + _tokena##_tokenb##_tokenc +#define _TP_COMBINE_TOKENS3(_tokena, _tokenb, _tokenc) \ + __TP_COMBINE_TOKENS3(_tokena, _tokenb, _tokenc) +#define __TP_COMBINE_TOKENS4(_tokena, _tokenb, _tokenc, _tokend) \ + _tokena##_tokenb##_tokenc##_tokend +#define _TP_COMBINE_TOKENS4(_tokena, _tokenb, _tokenc, _tokend) \ + __TP_COMBINE_TOKENS4(_tokena, _tokenb, _tokenc, _tokend) /* _TP_EXVAR* extract the var names. */ #define _TP_EXVAR0() @@ -182,10 +192,14 @@ static void __attribute__((constructor)) __tracepoints__init(void) liblttngust_handle = dlopen("liblttng-ust.so", RTLD_NOW | RTLD_GLOBAL); if (!liblttngust_handle) return; - tracepoint_register_lib = dlsym(liblttngust_handle, - "tracepoint_register_lib"); - tracepoint_unregister_lib = dlsym(liblttngust_handle, - "tracepoint_unregister_lib"); + tracepoint_register_lib = + URCU_FORCE_CAST(int (*)(struct tracepoint * const *, int), + dlsym(liblttngust_handle, + "tracepoint_register_lib")); + tracepoint_unregister_lib = + URCU_FORCE_CAST(int (*)(struct tracepoint * const *), + dlsym(liblttngust_handle, + "tracepoint_unregister_lib")); tracepoint_register_lib(__start___tracepoints_ptrs, __stop___tracepoints_ptrs - __start___tracepoints_ptrs);