当前位置: 技术问答>linux和unix
PAGE_BUG(PAGE)??
来源: 互联网 发布时间:2016-11-21
本文导语: 这个函数的函数体在哪里?实现什么? | linux/include/asm-xtensa/bug.h -------------------------------------------------------------------------------- 1 /* 2 * include/asm-xtensa/bug.h 3 * 4 * Macros to ca...
这个函数的函数体在哪里?实现什么?
|
linux/include/asm-xtensa/bug.h
--------------------------------------------------------------------------------
1 /*
2 * include/asm-xtensa/bug.h
3 *
4 * Macros to cause a 'bug' message.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13 #ifndef _XTENSA_BUG_H
14 #define _XTENSA_BUG_H
15
16 #include
17
18 #define ILL __asm__ __volatile__ (".byte 0,0,0n")
19
20 #ifdef CONFIG_KALLSYMS
21 # define BUG() do {
22 printk("kernel BUG at %s:%d!n", __FILE__, __LINE__);
23 ILL;
24 } while (0)
25 #else
26 # define BUG() do {
27 printk("kernel BUG!n");
28 ILL;
29 } while (0)
30 #endif
31
32 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
33 #define PAGE_BUG(page) do { BUG(); } while (0) 34 #define WARN_ON(condition) do {
35 if (unlikely((condition)!=0)) {
36 printk ("Warning in %s at %s:%dn", __FUNCTION__, __FILE__, __LINE__);
37 dump_stack();
38 }
39 } while (0)
40
41 #endif /* _XTENSA_BUG_H */
--------------------------------------------------------------------------------
1 /*
2 * include/asm-xtensa/bug.h
3 *
4 * Macros to cause a 'bug' message.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13 #ifndef _XTENSA_BUG_H
14 #define _XTENSA_BUG_H
15
16 #include
17
18 #define ILL __asm__ __volatile__ (".byte 0,0,0n")
19
20 #ifdef CONFIG_KALLSYMS
21 # define BUG() do {
22 printk("kernel BUG at %s:%d!n", __FILE__, __LINE__);
23 ILL;
24 } while (0)
25 #else
26 # define BUG() do {
27 printk("kernel BUG!n");
28 ILL;
29 } while (0)
30 #endif
31
32 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
33 #define PAGE_BUG(page) do { BUG(); } while (0) 34 #define WARN_ON(condition) do {
35 if (unlikely((condition)!=0)) {
36 printk ("Warning in %s at %s:%dn", __FUNCTION__, __FILE__, __LINE__);
37 dump_stack();
38 }
39 } while (0)
40
41 #endif /* _XTENSA_BUG_H */
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。