X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fust%2Ftracepoint.h;h=ade567726e9c4cffeffc5e0c39d61a8b66927a35;hb=5296e06cffd5ed5dcf3bb9fe7e3a18744ac18823;hp=9463e4072fa6411d054a2c0f74bd7f6b3f9631f2;hpb=2874fee50444405591974a7166313063b315efe1;p=ust.git diff --git a/include/ust/tracepoint.h b/include/ust/tracepoint.h index 9463e40..ade5677 100644 --- a/include/ust/tracepoint.h +++ b/include/ust/tracepoint.h @@ -27,6 +27,7 @@ #include #include +#include struct tracepoint_probe { void *func; @@ -70,12 +71,13 @@ struct tracepoint { /* * it_func[0] is never NULL because there is at least one element in the array * when the array itself is non NULL. + * __attribute__((unused)) is for backward compatibility API. */ #define __DO_TRACE(tp, proto, args) \ do { \ struct tracepoint_probe *__tp_it_probe_ptr; \ void *__tp_it_func; \ - void *__tp_cb_data; \ + void *__tp_cb_data __attribute__((unused)); \ \ rcu_read_lock(); \ __tp_it_probe_ptr = rcu_dereference((tp)->probes); \ @@ -95,7 +97,7 @@ struct tracepoint { #define __CHECK_TRACE(name, proto, args) \ do { \ - if (unlikely(__tracepoint_##name.state)) \ + if (caa_unlikely(__tracepoint_##name.state)) \ __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(proto), TP_ARGS(args)); \ } while (0)