bug.h 516 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10
#ifndef _I386_BUG_H
#define _I386_BUG_H


/*
 * Tell the user there is some problem.
 * The offending file and line are encoded after the "officially
 * undefined" opcode for parsing in the trap handler.
 */

M
Matt Mackall 已提交
11 12
#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
L
Linus Torvalds 已提交
13 14 15 16 17 18 19 20 21
#ifdef CONFIG_DEBUG_BUGVERBOSE
#define BUG()				\
 __asm__ __volatile__(	"ud2\n"		\
			"\t.word %c0\n"	\
			"\t.long %c1\n"	\
			 : : "i" (__LINE__), "i" (__FILE__))
#else
#define BUG() __asm__ __volatile__("ud2\n")
#endif
M
Matt Mackall 已提交
22
#endif
L
Linus Torvalds 已提交
23 24 25

#include <asm-generic/bug.h>
#endif