diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2011-03-16 19:04:27 -0400 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2011-03-16 19:04:27 -0400 |
commit | 36040ebd961ad67ff127f3f7f615918eaae41f1e (patch) | |
tree | 30c072c41c26521fb06ca9511943c9e298267ba7 /include/linux/marker.h | |
parent | bb8d9ad4504017c1c882543bbf460194858da2ae (diff) |
immediate-values/linux-kernel-markers-immediate-values
Linux Kernel Markers - Use Immediate Values
Make markers use immediate values.
Changelog :
- Use imv_* instead of immediate_*.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'include/linux/marker.h')
-rw-r--r-- | include/linux/marker.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/marker.h b/include/linux/marker.h index 1f4e2e5a920..1b2e37ecb6f 100644 --- a/include/linux/marker.h +++ b/include/linux/marker.h @@ -14,6 +14,7 @@ #include <stdarg.h> #include <linux/types.h> +#include <linux/immediate.h> struct module; struct marker; @@ -43,7 +44,7 @@ struct marker { const char *format; /* Marker format string, describing the * variable argument list. */ - char state; /* Marker state. */ + DEFINE_IMV(char, state);/* Immediate value state. */ char ptype; /* probe type : 0 : single, 1 : multi */ /* Probe wrapper */ void (*call)(const struct marker *mdata, void *call_private, ...); @@ -84,9 +85,16 @@ struct marker { do { \ DEFINE_MARKER(name, format); \ __mark_check_format(format, ## args); \ - if (unlikely(__mark_##name.state)) { \ - (*__mark_##name.call) \ - (&__mark_##name, call_private, ## args);\ + if (!generic) { \ + if (unlikely(imv_read(__mark_##name.state))) \ + (*__mark_##name.call) \ + (&__mark_##name, call_private, \ + ## args); \ + } else { \ + if (unlikely(_imv_read(__mark_##name.state))) \ + (*__mark_##name.call) \ + (&__mark_##name, call_private, \ + ## args); \ } \ } while (0) |