提交 0778d9ad 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

ftrace: Make FTRACE_WARN_ON() work in if condition

Let FTRACE_WARN_ON() be used as a stand alone statement or
inside a conditional: if (FTRACE_WARN_ON(x))
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 32673822
......@@ -39,16 +39,20 @@
#include "trace_stat.h"
#define FTRACE_WARN_ON(cond) \
do { \
if (WARN_ON(cond)) \
({ \
int ___r = cond; \
if (WARN_ON(___r)) \
ftrace_kill(); \
} while (0)
___r; \
})
#define FTRACE_WARN_ON_ONCE(cond) \
do { \
if (WARN_ON_ONCE(cond)) \
({ \
int ___r = cond; \
if (WARN_ON_ONCE(___r)) \
ftrace_kill(); \
} while (0)
___r; \
})
/* hash bits for specific function selection */
#define FTRACE_HASH_BITS 7
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册