warn_slowpath_common

来源:互联网 发布:新版淘宝联盟自己购买 编辑:程序博客网 时间:2024/06/03 13:34

warn_slowpath_common  

From: http://lhsblog01.blog.163.com/blog/static/10200451920115274838888/
出现这个函数,表示当前运行的状态不对,有BUG,但可能不是致命错误。


void warn_slowpath_null(const char *file, int line)
{
warn_slowpath_common(file, line, __builtin_return_address(0), NULL);
}

#define __WARN() warn_slowpath_null(__FILE__, __LINE__)

#define WARN_ON(condition) ({ \
int __ret_warn_on = !!(condition);\
if (unlikely(__ret_warn_on))\
__WARN();\
unlikely(__ret_warn_on);\
})

WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report significant issues that need prompt attention if they should ever appear at runtime.  Use the versions with printk format strings to provide better diagnostics.
0 0
原创粉丝点击