warn_slowpath_common

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.
發佈了129 篇原創文章 · 獲贊 15 · 訪問量 140萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章